check for ws equality on close, like original

This commit is contained in:
Noah Zalev 2022-01-08 15:18:35 -05:00
parent 8368c8e641
commit cb8337c3a3

View File

@ -5728,7 +5728,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
function serverCommandClose(command) {
// Close the web socket session
try { delete obj.req.session.ws; } catch (e) { }
try { if (obj.req.session.ws == ws) delete obj.req.session.ws; } catch (e) { }
try { ws.close(); } catch (e) { }
}