tls: make StreamWrap work correctly when waiting for "drain" events in doShutdown#23294
tls: make StreamWrap work correctly when waiting for "drain" events in doShutdown#23294oyyd wants to merge 1 commit intonodejs:masterfrom
Conversation
addaleax
left a comment
There was a problem hiding this comment.
The following test will fail before this commit.
Is there a way to reach this error through public API? If so, can we use that for the test?
lib/internal/wrap_js_stream.js
Outdated
There was a problem hiding this comment.
This assertion can stay, right? Or is it “too obvious” that it’s true?
There was a problem hiding this comment.
You are right. We can't be too careful here.
lib/internal/wrap_js_stream.js
Outdated
There was a problem hiding this comment.
Aside: This should be .once(), I think?
|
I reached this error when I tried to use In fact, I can't produce this through public API as As the situations that would reach this line of code seem to be rare, removing the listener to |
When an instance of StreamWrap is shutting down and a "drain" event is emitted, the instance will abort as its `this[kCurrentShutdownRequest]` is already set. The following test will fail before this commit.
|
The travis ci is green now. I didn't notice the |
|
Landed in e4dea40. |
When an instance of StreamWrap is shutting down and a "drain" event is emitted, the instance will abort as its `this[kCurrentShutdownRequest]` is already set. The following test will fail before this commit. PR-URL: #23294 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
When an instance of StreamWrap is shutting down and a "drain" event is emitted, the instance will abort as its `this[kCurrentShutdownRequest]` is already set. The following test will fail before this commit. PR-URL: #23294 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
When an instance of StreamWrap is shutting down and a "drain" event is emitted, the instance will abort as its `this[kCurrentShutdownRequest]` is already set. The following test will fail before this commit. PR-URL: #23294 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
When an instance of StreamWrap is shutting down and a "drain" event is emitted, the instance will abort as its `this[kCurrentShutdownRequest]` is already set. The following test will fail before this commit. PR-URL: #23294 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
When an instance of StreamWrap is shutting down and a "drain" event is emitted, the instance will abort as its `this[kCurrentShutdownRequest]` is already set. The following test will fail before this commit. PR-URL: #23294 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
When an instance of StreamWrap is shutting down and a "drain" event is emitted, the instance will abort as its `this[kCurrentShutdownRequest]` is already set. The following test will fail before this commit. PR-URL: #23294 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
When an instance of StreamWrap is shutting down and a "drain" event is emitted, the instance will abort as its `this[kCurrentShutdownRequest]` is already set. The following test will fail before this commit. PR-URL: #23294 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
When an instance of
StreamWrapis shutting down and a "drain" event is emitted, the process will abort as itsthis[kCurrentShutdownRequest]is already set bydoShutdownitself.The following test will fail before this commit.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes