webrtc gateway shouldnt remove session on close

This commit is contained in:
dank074 2025-05-08 00:29:38 -05:00
parent f28ebd15ad
commit fa19cd048c

View File

@ -17,11 +17,9 @@
*/
import { WebSocket } from "@spacebar/gateway";
import { Session } from "@spacebar/util";
export async function onClose(this: WebSocket, code: number, reason: string) {
console.log("[WebRTC] closed", code, reason.toString());
if (this.session_id) await Session.delete({ session_id: this.session_id });
this.removeAllListeners();
}