diff --git a/lib/net.js b/lib/net.js index 09e34f75bd01f2..2b099d75efb7eb 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; }