diff options
Diffstat (limited to 'lib/net.js')
-rw-r--r-- | lib/net.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/net.js b/lib/net.js index 7d0a4a0e54..92b04838b6 100644 --- a/lib/net.js +++ b/lib/net.js @@ -744,13 +744,13 @@ Socket.prototype._writeGeneric = function(writev, data, encoding, cb) { this._pendingData = null; this._pendingEncoding = ''; - this._unrefTimer(); - if (!this._handle) { this.destroy(new ERR_SOCKET_CLOSED(), cb); return false; } + this._unrefTimer(); + var req = createWriteWrap(this._handle, afterWrite); if (writev) writevGeneric(this, req, data, cb); |