From 1745b22f25a7e4f16a0d40f9aec28387ea46dd65 Mon Sep 17 00:00:00 2001 From: Brian White Date: Thu, 16 Jul 2015 14:55:29 -0400 Subject: [PATCH] Connection: use socket.end() instead of socket.destroy() --- lib/Connection.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Connection.js b/lib/Connection.js index 7384ba1..7e2046e 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -292,7 +292,7 @@ Connection.prototype.serverSupports = function(cap) { Connection.prototype.destroy = function() { this._queue = []; this._curReq = undefined; - this._sock && this._sock.destroy(); + this._sock && this._sock.end(); }; Connection.prototype.end = function() { @@ -1591,7 +1591,7 @@ Connection.prototype._login = function() { clearTimeout(self._tmrAuth); if (err) { self.emit('error', err); - return self._sock.destroy(); + return self._sock.end(); } // 2. Get the list of available namespaces (RFC2342)