Connection: use socket.end() instead of socket.destroy()

fork
Brian White 9 years ago
parent 8eddf61860
commit 1745b22f25

@ -292,7 +292,7 @@ Connection.prototype.serverSupports = function(cap) {
Connection.prototype.destroy = function() { Connection.prototype.destroy = function() {
this._queue = []; this._queue = [];
this._curReq = undefined; this._curReq = undefined;
this._sock && this._sock.destroy(); this._sock && this._sock.end();
}; };
Connection.prototype.end = function() { Connection.prototype.end = function() {
@ -1591,7 +1591,7 @@ Connection.prototype._login = function() {
clearTimeout(self._tmrAuth); clearTimeout(self._tmrAuth);
if (err) { if (err) {
self.emit('error', err); self.emit('error', err);
return self._sock.destroy(); return self._sock.end();
} }
// 2. Get the list of available namespaces (RFC2342) // 2. Get the list of available namespaces (RFC2342)

Loading…
Cancel
Save