zlib: fix interaction of flushing and needDrain
Fixes: https://github.com/nodejs/node/issues/14523
I’d appreciate a review from @aaliddell who has obviously given this some thought.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
zlib