Skip to content

Commit

Permalink
Only add the output stream write cb if there's a cb
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Sep 19, 2011
1 parent 7c4c8d4 commit ea8f567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/output.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function write (args, stream, lf, cb) {
var flushed = stream.write(msg) var flushed = stream.write(msg)
if (flushed && cb) { if (flushed && cb) {
process.nextTick(cb) process.nextTick(cb)
} else { } else if (cb) {
stream.once("drain", cb) stream.once("drain", cb)
} }
return flushed return flushed
Expand Down

0 comments on commit ea8f567

Please sign in to comment.