tls: make tls.connect() accept a timeout option
If specified, and only when a socket is created internally, the option
will make socket.setTimeout()
to be called on the created socket with
the given timeout.
This is consistent with the timeout
option of net.connect()
and
prevents the timeout
option of the https.Agent
from being ignored
when a socket is created.
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