summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-16 21:40:49 +0100
committerRory& <root@rory.gay>2026-02-16 21:40:49 +0100
commit0c384cf4e96f9ac1b87cd72d6b0ab782bcd6c34f (patch)
tree33e5b19275d400cc20a235c8b00b9252283dc977
parentgateeway debug logs (diff)
downloadserver-ts-0c384cf4e96f9ac1b87cd72d6b0ab782bcd6c34f.tar.xz
Gateway: dont block on clearing voice states
-rw-r--r--src/gateway/Server.ts3
-rw-r--r--src/gateway/util/Utils.ts9
2 files changed, 4 insertions, 8 deletions
diff --git a/src/gateway/Server.ts b/src/gateway/Server.ts

index 4918f1b5..7fea1a27 100644 --- a/src/gateway/Server.ts +++ b/src/gateway/Server.ts
@@ -171,12 +171,9 @@ export class Server { await Config.init(); await initEvent(); // temporary fix - console.log("[Gateway] Clearing voice states"); await cleanupOnStartup(); - console.log("[Gateway] dbg checking if server is listening"); if (!this.server.listening) { - console.log("gonna start listening on", this.port); this.server.listen(this.port); console.log(`[Gateway] online on 0.0.0.0:${this.port}`); } diff --git a/src/gateway/util/Utils.ts b/src/gateway/util/Utils.ts
index 1757b845..a629751b 100644 --- a/src/gateway/util/Utils.ts +++ b/src/gateway/util/Utils.ts
@@ -53,9 +53,8 @@ export async function cleanupOnStartup(): Promise<void> { // }, //); - try { - await VoiceState.clear(); - } catch (e) { - console.error("Error clearing voice states on startup:", e); - } + console.log("[Gateway] Starting async voice state wipe..."); + VoiceState.clear() + .then((e) => console.log("[Gateway] Successfully cleaned voice states")) + .catch((e) => console.error("[Gateway] Error cleaning voice states on startup:", e)); }