-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
tls: accept empty net.Socket
s
#1046
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
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: nodejs#987
@@ -506,6 +513,7 @@ TLSSocket.prototype._start = function() { | |||
return; | |||
} | |||
|
|||
debug('start'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentional change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm tired of putting console.log()
here during debugging :)
LGTM. What does the CI say? |
does the test cover the same reduced case you narrowed down in #987? |
Yes. |
|
@rvagg second one is actually a continuation of this. I decided to do the simple first and harder later :) |
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: #987 PR-URL: #1046 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rod Vagg <rod@vagg.org>
Landed in 7b3b8ac, thank you! |
Accept
new net.Socket()
as asocket
option totls.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: #987
cc @iojs/streams @iojs/crypto @iojs/collaborators