diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-11-03 19:48:47 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-11-10 23:54:48 +0300 |
commit | d3f02d0da3d574b91a15d3ace10e76014b7574fc (patch) | |
tree | 7982db3b18811ca0cd7d4da5a66c43c6ecf1953e /LICENSE | |
parent | fb6c6692a8d2e7e4d86a742216151a6e5e15739b (diff) |
stream: make `.destroy()` interact better with write queue
Make sure that it is safe to call the callback for `_write()`
even in the presence of `.destroy()` calls during that write.
In particular, letting the write queue continue processing would
previously have thrown an exception, because processing writes
after calling `.destroy()` is forbidden.
One test had to be modified to account for the fact that callbacks
for writes will now always be called, even when the stream
is destroyed during the process.
PR-URL: https://github.com/nodejs/node/pull/24062
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions