Connection: fix destroy()

fork
mscdex 11 years ago
parent 4285211a73
commit ccf397d7f9

@ -231,13 +231,15 @@ Connection.prototype.serverSupports = function(cap) {
Connection.prototype.destroy = function() {
this._queue = [];
this._curReq = undefined;
this._sock.end();
this._sock.destroy();
};
Connection.prototype.end = function() {
var self = this;
this._enqueue('LOGOUT', function() {
self.destroy();
self._queue = [];
self._curReq = undefined;
self._sock.end();
});
};

Loading…
Cancel
Save