attempt to make streams handler more watertight

main v1.3.1
Ayush Mukherjee 4 years ago
parent 21c48b2a03
commit a5ead194e4

@ -48,11 +48,11 @@ server.on('upgrade', (req, socket, head) => {
wss1.emit('connection', socket, req) wss1.emit('connection', socket, req)
}) })
} else if (pathname[1] === 'stream') { } else if (pathname[1] === 'stream') {
if (token != null || token != '' || token != "") {
wss2.handleUpgrade(req, socket, head, (socket) => { wss2.handleUpgrade(req, socket, head, (socket) => {
if (req.id != null || req.id != '') {
req.id = token req.id = token
wss2.emit('connection', socket, req) wss2.emit('connection', socket, req)
}
}) })
} }
}
}) })
Loading…
Cancel
Save