Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
net: callback to socket.write should always be called asynchronously
  • Loading branch information
etlovett authored and bnoordhuis committed Sep 24, 2011
1 parent f6bce20 commit f9fec3a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/net.js
Expand Up @@ -464,7 +464,9 @@ Socket.prototype._writeOut = function(data, encoding, fd, cb) {
if (queuedData) {
return false;
} else {
if (cb) cb();
if (cb) {
process.nextTick(cb);
}
return true;
}
}
Expand Down

0 comments on commit f9fec3a

Please sign in to comment.