mirror of
https://github.com/Yonle/bostr.git
synced 2025-03-18 05:42:03 +01:00
fix major bug
Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
parent
4ca71948c3
commit
4699ba1b48
@ -44,7 +44,7 @@ module.exports = (ws, req) => {
|
||||
pendingEOSE.add(data[1]);
|
||||
break;
|
||||
case "CLOSE":
|
||||
if (typeof(data[1]) !== "string") ws.send(JSON.stringify(["NOTICE", "error: bad request."]));
|
||||
if (typeof(data[1]) !== "string") return ws.send(JSON.stringify(["NOTICE", "error: bad request."]));
|
||||
data[1] = ws.id + ":" + data[1];
|
||||
bc(data);
|
||||
pendingEOSE.delete(data[1]);
|
||||
|
@ -43,7 +43,7 @@ module.exports = (ws, req) => {
|
||||
pendingEOSE.add(ws.id + ":" + data[1]);
|
||||
break;
|
||||
case "CLOSE":
|
||||
if (typeof(data[1]) !== "string") ws.send(JSON.stringify(["NOTICE", "error: bad request."]));
|
||||
if (typeof(data[1]) !== "string") return ws.send(JSON.stringify(["NOTICE", "error: bad request."]));
|
||||
bc(data, ws.id);
|
||||
pendingEOSE.delete(ws.id + ":" + data[1]);
|
||||
sess.prepare("DELETE FROM sess WHERE cID = ? AND subID = ?;").run(ws.id, data[1]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user