diff --git a/lib/Connection.js b/lib/Connection.js index 4461764..57ccee8 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -136,7 +136,7 @@ Connection.prototype.connect = function() { err.source = 'socket'; self.emit('error', err); }; - this._sock.once('error', this._onError); + this._sock.on('error', this._onError); socket.once('close', function(had_err) { clearTimeout(self._tmrConn);