@ -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();
});