diff --git a/lib/Connection.js b/lib/Connection.js index 356e085..4671982 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -243,7 +243,7 @@ Connection.prototype.serverSupports = function(cap) { Connection.prototype.destroy = function() { this._queue = []; this._curReq = undefined; - this._sock.destroy(); + this._sock && this._sock.destroy(); }; Connection.prototype.end = function() {