From 401a5852dcdd313490a379563ecb523c3c71c406 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Sat, 4 Jan 2020 10:52:57 +0100 Subject: [PATCH] [minor] Fix misleading comment As of commit https://github.com/nodejs/node/commit/0e89b64d66 the `zlib.flush()` callback can be called if `zlib.close()` is called while data is being processed. --- lib/permessage-deflate.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/permessage-deflate.js b/lib/permessage-deflate.js index 37aafba9a..b9c5ef499 100644 --- a/lib/permessage-deflate.js +++ b/lib/permessage-deflate.js @@ -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; }