[v9.x] net: handle allowHalfOpen before calling super ctor
If the allowHalfOpen
option is not provided, use its default value
before calling the Duplex
constructor. This allows the no-half-open
enforcer to be properly added.
Fixes: https://github.com/nodejs/node/issues/19764
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines