Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Commit

Permalink
redo fix to FileWriter.write to only check the queue length if ret is…
Browse files Browse the repository at this point in the history
… false
  • Loading branch information
demmer authored and isaacs committed Jun 27, 2014
1 parent 1df0140 commit 43fe0b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/file-writer.js
Expand Up @@ -72,7 +72,11 @@ FileWriter.prototype.write = function (c) {

// allow 2 buffered writes, because otherwise there's just too
// much stop and go bs.
return ret || (me._stream._queue ? (me._stream._queue.length <= 2) : false)
if (ret === false && me._stream._queue) {
return me._stream._queue.length <= 2;
} else {
return ret;
}
}

FileWriter.prototype.end = function (c) {
Expand Down

0 comments on commit 43fe0b3

Please sign in to comment.