mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-30 01:35:52 +00:00
🐛 only delete session id for authenticated connections
This commit is contained in:
@@ -4,7 +4,7 @@ import { Session } from "@fosscord/util";
|
||||
|
||||
export async function Close(this: WebSocket, code: number, reason: string) {
|
||||
console.log("[WebSocket] closed", code, reason);
|
||||
await Session.delete({ session_id: this.session_id });
|
||||
if (this.session_id) await Session.delete({ session_id: this.session_id });
|
||||
// @ts-ignore
|
||||
this.off("message", Message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user