-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compatibility with Node.js master #312
Conversation
lib/spdy/server.js
Outdated
@@ -189,6 +189,8 @@ proto._onStream = function _onStream (stream) { | |||
socket = new net.Socket(socketOptions) | |||
} | |||
|
|||
if (process.versions.modules >= 46) { socket.server = this } |
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.
Currently this is only needed for Node.js master but also handles the unlikely case where nodejs/node#11926 will be backported to Node.js 6 and 4 (modules >= 46
).
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.
This kind of code would be well served with a code comment :) Both the if-condition as well as the server
assignment are puzzling to someone who doesn't know the background behind this 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.
Agreed will add in a bit.
768bbbb
to
8e85b81
Compare
8e85b81
to
d2fe97d
Compare
@diasdavid can you please take a look when you have time? |
Compatibility restoration confirmed |
Like #309 but takes into account Node.js versions below 4.