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 <firstname.lastname@example.org> Reviewed-By: Luigi Pinca <email@example.com> Reviewed-By: Ben Noordhuis <firstname.lastname@example.org> Reviewed-By: Rich Trott <email@example.com> Reviewed-By: James M Snell <firstname.lastname@example.org> Reviewed-By: Colin Ihrig <email@example.com>
- 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();|