Fixed server exception in web relay when websocket fails to connect, #4172.

This commit is contained in:
Ylian Saint-Hilaire 2022-07-01 01:18:18 -07:00
parent b3d72655d5
commit dd5b1b2bcd
1 changed files with 1 additions and 1 deletions

View File

@ -638,7 +638,7 @@ module.exports.CreateWebRelay = function (parent, db, args, domain) {
} }
} else { } else {
// Tunnel is now in web socket pass-thru mode // Tunnel is now in web socket pass-thru mode
if (header.connection.toLowerCase() == 'upgrade') { if ((typeof header.connection == 'string') && (header.connection.toLowerCase() == 'upgrade')) {
// Websocket upgrade succesful // Websocket upgrade succesful
obj.socketParseState = 2; obj.socketParseState = 2;
} else { } else {