mirror of
https://github.com/Yonle/bostr.git
synced 2025-07-20 08:52:50 +02:00
@ -44,7 +44,7 @@ module.exports = (ws, req) => {
|
|||||||
pendingEOSE.add(data[1]);
|
pendingEOSE.add(data[1]);
|
||||||
break;
|
break;
|
||||||
case "CLOSE":
|
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];
|
data[1] = ws.id + ":" + data[1];
|
||||||
bc(data);
|
bc(data);
|
||||||
pendingEOSE.delete(data[1]);
|
pendingEOSE.delete(data[1]);
|
||||||
|
@ -43,7 +43,7 @@ module.exports = (ws, req) => {
|
|||||||
pendingEOSE.add(ws.id + ":" + data[1]);
|
pendingEOSE.add(ws.id + ":" + data[1]);
|
||||||
break;
|
break;
|
||||||
case "CLOSE":
|
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);
|
bc(data, ws.id);
|
||||||
pendingEOSE.delete(ws.id + ":" + data[1]);
|
pendingEOSE.delete(ws.id + ":" + data[1]);
|
||||||
sess.prepare("DELETE FROM sess WHERE cID = ? AND subID = ?;").run(ws.id, data[1]);
|
sess.prepare("DELETE FROM sess WHERE cID = ? AND subID = ?;").run(ws.id, data[1]);
|
||||||
|
Reference in New Issue
Block a user