Skip to content

Commit

Permalink
fix npm#249
Browse files Browse the repository at this point in the history
This attaches a catch handler to the handleContentP promise, as in some cases the flush is not called before node decides that this is an unhandled promise rejection.
  • Loading branch information
kalinkrustev authored Nov 22, 2023
1 parent 1a74bd3 commit 2e1383d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/content/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class CacacheWriteStream extends Flush {
this.cache,
this.opts
)
this.handleContentP.catch(error => this.destroy(error))
}
return this.inputStream.write(chunk, encoding, cb)
}
Expand Down

0 comments on commit 2e1383d

Please sign in to comment.