We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 651ce41 + d2fe97d commit 81edd1aCopy full SHA for 81edd1a
1 file changed
lib/spdy/server.js
@@ -189,6 +189,14 @@ proto._onStream = function _onStream (stream) {
189
socket = new net.Socket(socketOptions)
190
}
191
192
+ // This is needed because the `error` listener, added by the default
193
+ // `connection` listener, no longer has bound arguments. It relies instead
194
+ // on the `server` property of the socket. See https://github.com/nodejs/node/pull/11926
195
+ // for more details.
196
+ // This is only done for Node.js >= 4 in order to not break compatibility
197
+ // with older versions of the platform.
198
+ if (process.versions.modules >= 46) { socket.server = this }
199
+
200
handle.assignSocket(socket)
201
202
// For v0.8
0 commit comments