blob: 4afe8352c236c4885fe008566337778cd9fde7d7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
import WebSocket from "@fosscord/gateway/util/WebSocket";
import { Message } from "./Message";
import { Session } from "@fosscord/util";
export async function Close(this: WebSocket, code: number, reason: string) {
console.log("[WebSocket] closed", code, reason);
if (this.session_id) await Session.delete({ session_id: this.session_id });
// @ts-ignore
this.off("message", Message);
}
|