tls: make StreamWrap work correctly when waiting for "drain" events in doShutdown
When an instance of StreamWrap
is shutting down and a "drain" event is emitted, the process will abort as its this[kCurrentShutdownRequest]
is already set by doShutdown
itself.
The following test will fail before this commit.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines