Skip to content

Commit

Permalink
Fix createMultiServer in newer nodejs versions
Browse files Browse the repository at this point in the history
Make sure to set `socket.server` to the appropriate server handler before delegating.

This became required as of node v9.6, due to the changes introduced in nodejs/node@c247cb0

Fixes #10.
  • Loading branch information
shesek committed Sep 3, 2018
1 parent 7a5da03 commit 13c2bff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/transport/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ const createMultiServer = (tlsOpt, tlsHandler, plainHandler) => {
socket.unshift(buff)

// Delegate the socket to the appropriate handler
socket.server = server[proto]
server[proto].emit('connection', socket)

socket.resume()
Expand Down

0 comments on commit 13c2bff

Please sign in to comment.