We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3db8bf9 commit 8c28f02Copy full SHA for 8c28f02
server.js
@@ -127,7 +127,12 @@ function Server (opts) {
127
return self.http.address()
128
}
129
self.ws.on('error', function (err) { self._onError(err) })
130
- self.ws.on('connection', function (socket) { self.onWebSocketConnection(socket) })
+ self.ws.on('connection', function (socket, req) {
131
+ // Note: socket.upgradeReq was removed in [email protected], so re-add it.
132
+ // https://github.com/websockets/ws/pull/1099
133
+ socket.upgradeReq = req
134
+ self.onWebSocketConnection(socket)
135
+ })
136
137
138
if (opts.stats !== false) {
0 commit comments