Skip to content

Commit

Permalink
[minor] Fix misleading comment
Browse files Browse the repository at this point in the history
As of commit nodejs/node@0e89b64d66 the
`zlib.flush()` callback can be called if `zlib.close()` is called
while data is being processed.
  • Loading branch information
lpinca committed Jan 4, 2020
1 parent b59eff6 commit 401a585
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/permessage-deflate.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,7 @@ class PerMessageDeflate {
this._deflate.flush(zlib.Z_SYNC_FLUSH, () => {
if (!this._deflate) {
//
// This `if` statement is only needed for Node.js < 10.0.0 because as of
// commit https://github.com/nodejs/node/commit/5e3f5164, the flush
// callback is no longer called if the deflate stream is closed while
// data is being processed.
// The deflate stream was closed while data was being processed.
//
return;
}
Expand Down

0 comments on commit 401a585

Please sign in to comment.