summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-06-22 00:42:11 +0200
committerRory& <root@rory.gay>2026-06-22 00:42:11 +0200
commit7837a030bcf069b9f243a067a02be0a6171de4ec (patch)
treea11a05b52bec85a5fc3a1f28de92018036c17cd0 /src
parentLazyRequest: support offload (diff)
downloadserver-ts-7837a030bcf069b9f243a067a02be0a6171de4ec.tar.xz
Close: use session as predicate rather than session_id due to early init
Diffstat (limited to 'src')
-rw-r--r--src/gateway/events/Close.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gateway/events/Close.ts b/src/gateway/events/Close.ts

index 7a8d79ed..0cdd5741 100644 --- a/src/gateway/events/Close.ts +++ b/src/gateway/events/Close.ts
@@ -30,7 +30,7 @@ export async function Close(this: WebSocket, code: number, reason: Buffer) { this.inflate?.close(); this.removeAllListeners(); - if (this.session_id) { + if (this.session) { const authSessionId = this.session?.session_id; const closedAt = Date.now(); @@ -66,6 +66,7 @@ export async function Close(this: WebSocket, code: number, reason: Buffer) { } }, 10_000); + if (!this.user_id) console.error("No user id in websocket???", this); const voiceState = await VoiceState.findOne({ where: { user_id: this.user_id }, });