Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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 f9fec3a2d65580b7e39edc9afd5904cd4775c87c
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/net.js
@@ -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;
}
}

0 comments on commit f9fec3a

Please sign in to comment.
You can’t perform that action at this time.