doc: add warning for socket.connect reuse
socket.connect
is subtly broken due to timing and _undestroy issues. Discourage usage and ask users to instead create a new socket instance.
Note, this is a problem when calling connect
a second time.
I believe since it's a bit tricky to resolve, it might be appropriate to deprecate this use case since there is a viable alternative in simply creating a new socket.
Refs: https://github.com/nodejs/node/issues/25969
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