webrtc gateway shouldnt remove session on close
This commit is contained in:
parent
f28ebd15ad
commit
fa19cd048c
@ -17,11 +17,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { WebSocket } from "@spacebar/gateway";
|
import { WebSocket } from "@spacebar/gateway";
|
||||||
import { Session } from "@spacebar/util";
|
|
||||||
|
|
||||||
export async function onClose(this: WebSocket, code: number, reason: string) {
|
export async function onClose(this: WebSocket, code: number, reason: string) {
|
||||||
console.log("[WebRTC] closed", code, reason.toString());
|
console.log("[WebRTC] closed", code, reason.toString());
|
||||||
|
|
||||||
if (this.session_id) await Session.delete({ session_id: this.session_id });
|
|
||||||
this.removeAllListeners();
|
this.removeAllListeners();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user