test: add a test for "tls.Socket" with "StreamWrap" and "allowHalfOpen"
A tls client socket using StreamWrap
with allowHalfOpen
option might hang instead of exiting automatically because the 'drain' event may not be emitted. This commit corrects it by making StreamWrap
try doShutdown
in finishWrite
.
Before this commit, running the following test will make processes hang.
This test ensures that a tls client socket using StreamWrap
with allowHalfOpen
option won't hang.
Refs: #23654
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines