diff options
-rw-r--r-- | lib/net.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net.js b/lib/net.js index 09e34f75bd..2b099d75ef 100644 --- a/lib/net.js +++ b/lib/net.js @@ -685,7 +685,7 @@ Socket.prototype._writeGeneric = function(writev, data, encoding, cb) { this._pendingEncoding = ''; if (!this._handle) { - this.destroy(new ERR_SOCKET_CLOSED(), cb); + cb(new ERR_SOCKET_CLOSED()); return false; } |