stream: finish must always follow error
When _write
completes with an Error
, 'finish'
was emitted before 'error'
if the callback was asynchronous. This commit restore the previous behavior.
The logic is still less then ideal, because we call the write()
callback before emitting error if asynchronous, but after if synchronous. This commit do not try to change the behavior.
Fixes: #13812 (closed)
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
stream