Skip to content

tls: accept empty `net.Socket`s

Rodrigo Muino Tomonari requested to merge github/fork/indutny/fix/gh-987 into v1.x

Accept new net.Socket() as a socket option to tls.connect() without triggering an assertion error in C++.

This is done by wrapping it into a JSStream to ensure that there will be a handle at the time of wrapping the socket into TLSSocket.

Fix: https://github.com/iojs/io.js/issues/987

cc @iojs/streams @iojs/crypto @iojs/collaborators

Merge request reports

Loading