aboutsummaryrefslogtreecommitdiff
path: root/socket.js
diff options
context:
space:
mode:
Diffstat (limited to 'socket.js')
-rw-r--r--socket.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/socket.js b/socket.js
index 4563ed5..e49cd28 100644
--- a/socket.js
+++ b/socket.js
@@ -19,8 +19,8 @@ class retryws extends EventEmitter{ // a wrapper on ws that retries on failure
function sockinit(){ // addr is not expected to change, so not handed as input; similarly, sock is not passed in a chain because behavior is expected to be serial (either initializing or retrying)
sock = new ws(addr);
sock.on('open', () => { sockdown = false; self.emit('open'); });
- sock.on('close', (err) => { console.log(err); setTimeout(sockinit,1000); sockdown = true; self.emit('close'); });
- sock.on('error', (err) => { console.log(err); sock.close(); });
+ sock.on('close', (err) => { console.log('close', err); setTimeout(sockinit,1000); sockdown = true; self.emit('close'); });
+ sock.on('error', (err) => { console.log('error', err); sock.close(); });
sock.on('message', (message) => { self.emit('message',message);});
}
sockinit();