Skip to content

Commit f9fec3a

Browse files
etlovettbnoordhuis
authored andcommitted
net: callback to socket.write should always be called asynchronously
1 parent f6bce20 commit f9fec3a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/net.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,9 @@ Socket.prototype._writeOut = function(data, encoding, fd, cb) {
464464
if (queuedData) {
465465
return false;
466466
} else {
467-
if (cb) cb();
467+
if (cb) {
468+
process.nextTick(cb);
469+
}
468470
return true;
469471
}
470472
}

0 commit comments

Comments
 (0)