Skip to content

Fix compatibility with Node.js master - #312

Merged
daviddias merged 1 commit into
spdy-http2:masterfrom
lpinca:support/nodejs-8
May 23, 2017
Merged

Fix compatibility with Node.js master#312
daviddias merged 1 commit into
spdy-http2:masterfrom
lpinca:support/nodejs-8

Conversation

@lpinca

@lpinca lpinca commented Apr 12, 2017

Copy link
Copy Markdown
Contributor

Like #309 but takes into account Node.js versions below 4.

Comment thread lib/spdy/server.js
socket = new net.Socket(socketOptions)
}

if (process.versions.modules >= 46) { socket.server = this }

Copy link
Copy Markdown
Contributor Author

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).

@ronkorving ronkorving Apr 13, 2017

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

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.

@lpinca
lpinca force-pushed the support/nodejs-8 branch from 768bbbb to 8e85b81 Compare April 13, 2017 10:53
@lpinca
lpinca force-pushed the support/nodejs-8 branch from 8e85b81 to d2fe97d Compare April 13, 2017 12:07
@lpinca

lpinca commented Apr 17, 2017

Copy link
Copy Markdown
Contributor Author

@diasdavid can you please take a look when you have time?
nodejs/node#11926 has not yet landed in a v7 release as it breaks this module.
It would be great to know if this fix/workaround is acceptable.

@daviddias
daviddias merged commit 81edd1a into spdy-http2:master May 23, 2017
@lpinca
lpinca deleted the support/nodejs-8 branch May 23, 2017 05:32
@refack

refack commented May 23, 2017

Copy link
Copy Markdown

Compatibility restoration confirmed
Ref: https://github.com/nodejs/node/wiki/CITGM-Status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants