Please sign in to comment.
zlib: allow writes after readable 'end' to finish
Call the callback for writes that occur after the stream is closed. This also requires changes to the code to not call `.destroy()` on the stream in `.on('end')`, and to ignore chunks written afterwards. Previously, these writes would just queue up silently, as their `_write()` callback would never have been called. Fixes: #30976 PR-URL: #31082 Reviewed-By: Denys Otrishko <email@example.com> Reviewed-By: Luigi Pinca <firstname.lastname@example.org> Reviewed-By: Ben Noordhuis <email@example.com> Reviewed-By: Rich Trott <firstname.lastname@example.org> Reviewed-By: James M Snell <email@example.com> Reviewed-By: Colin Ihrig <firstname.lastname@example.org>
- Loading branch information
Showing with 21 additions and 8 deletions.
|@@ -0,0 +1,16 @@|
|const common = require('../common');|
|const zlib = require('zlib');|
|// Regression test for https://github.com/nodejs/node/issues/30976|
|// Writes to a stream should finish even after the readable side has been ended.|
|const data = zlib.deflateRawSync('Welcome');|
|const inflate = zlib.createInflateRaw();|