Fix compatibility with Node.js master#312
Conversation
| socket = new net.Socket(socketOptions) | ||
| } | ||
|
|
||
| if (process.versions.modules >= 46) { socket.server = this } |
There was a problem hiding this comment.
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.
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.
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.