Skip to content

test: add a test for "tls.Socket" with "StreamWrap" and "allowHalfOpen"

Rodrigo Muino Tomonari requested to merge github/fork/oyyd/tls-improve into master

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading