fix(gateway): resolve zombie connection hangs on gateway drops and reconnect opcodes

- Handle opcodes 7 (Reconnect) and 9 (InvalidSession) by terminating sockets and clearing session state for clean re-IDENTIFY
- Update gateway heartbeat timestamp exclusively on genuine Dispatch (op 0) and Heartbeat ACK (op 11)
- Trigger proactive shard reconnect immediately on raw WebSocket close events
- Tighten gateway watchdog intervals and add a hard-kill timeout on gracefulShutdown to prevent process hangs
- Allow child bot processes to control the Docker container health file
- Add guildId/guild getters on Message wrapper for robust command routing
This commit is contained in:
NoLogicAlan committed 2026-11-05 02:24:23 +03:00
1 parent 1251d8a53f
commit 36ad89b1d2
5 files changed
+157 -21

No files matched your search

+4
View File
@@ -132,6 +132,10 @@ export class Message {
get attachments() { return this.message.attachments ?? []; }
/** @returns {Channel} The wrapped channel this message was sent in. */
get channel() { return this.handler.getChannel(this.message.channelId); }
/** @returns {string|null} The guild ID. */
get guildId() { return this.message?.guildId ?? this.message?.guild?.id ?? this.channel?.channel?.guildId ?? this.channel?.guildId ?? null; }
/** @returns {object|null} The guild instance, if available. */
get guild() { return this.message?.guild ?? this.channel?.channel?.guild ?? this.channel?.guild ?? null; }
/**
* Observe reactions on this message.