Skip to content

Commit

Permalink
Comments and nits
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Jan 4, 2019
1 parent b8ec69d commit a52b295
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ function SonicBoom (fd, minLength, sync) {
this.release = (err, n) => {
if (err) {
if (err.code === 'EAGAIN') {
// let's give the destination some time to process the chunk
// Let's give the destination some time to process the chunk.
// This error code should not happen in sync mode, because it is
// not using the underlining operating system asynchronous functions.
setTimeout(() => {
fs.write(this.fd, this._writingBuf, 'utf8', this.release)
}, 100)
Expand Down Expand Up @@ -97,7 +99,7 @@ function SonicBoom (fd, minLength, sync) {
this._writing = false
this._reopening = false
this.reopen()
} else if (this._buf.length > 0 && len > this.minLength) {
} else if (len > 0 && len > this.minLength) {
actualWrite(this)
} else if (this._ending) {
if (len > 0) {
Expand Down

0 comments on commit a52b295

Please sign in to comment.