saram ali
7995e408ce
fix(discord): clear stale heartbeat timers in SafeGatewayPlugin.connect() ( #65087 )
...
* fix(discord): clear stale heartbeat timers in SafeGatewayPlugin.connect()
The @buape/carbon@0.15 .0 heartbeat setup has a race where stopHeartbeat()
runs before heartbeatInterval is assigned, leaving a stale setInterval with
a closed reconnectCallback. When the stale interval fires ~41s later it
throws an uncaught exception that bypasses the EventEmitter error path and
crashes the gateway process via process.on('uncaughtException').
Add a connect() override in SafeGatewayPlugin that unconditionally clears
both heartbeatInterval and firstHeartbeatTimeout before calling super. The
parent's connect() only calls stopHeartbeat() when isConnecting=false; when
isConnecting=true it returns early without clearing — this override fills
that gap.
Fixes #65009 . Related: #64011 , #63387 , #62038 .
* test(discord): assert super.connect() delegation in SafeGatewayPlugin tests
* fix(ci): update raw-fetch allowlist line numbers for gateway-plugin.ts
The connect() override added in the heartbeat fix shifted the two
pre-existing fetch() callsites from lines 370/436 to 387/453.
* docs(changelog): add discord heartbeat crash note
* test(cli): align plugin registry load-context mock
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org >
2026-04-12 18:40:04 +01:00
..
2026-03-29 20:05:41 -04:00
2026-04-10 22:48:35 +01:00
2026-04-11 21:36:45 -07:00
2026-04-10 00:01:17 +08:00
2026-04-11 22:00:34 -07:00
2026-04-12 12:46:20 +03:00
2026-03-27 11:47:35 -04:00
2026-04-11 13:02:52 -03:00
2026-04-11 14:18:04 +01:00
2026-04-09 01:35:15 +01:00
2026-04-03 12:45:13 +01:00
2026-04-12 09:09:50 +01:00
2026-03-28 08:37:26 -05:00
2026-04-10 20:14:49 +01:00
2026-04-06 13:40:41 +01:00
2026-03-30 22:35:50 -04:00
2026-04-06 16:55:50 +01:00
2026-04-06 16:49:28 +01:00
2026-04-11 16:10:13 +01:00
2026-04-11 14:29:02 +01:00
2026-04-08 07:18:31 +01:00
2026-04-05 07:34:33 +01:00
2026-04-04 12:17:46 +01:00
2026-04-05 09:23:55 +01:00
2026-04-10 21:22:16 +01:00
2026-03-30 00:15:08 +02:00
2026-04-10 19:23:10 +01:00
2026-04-07 09:12:26 +01:00
2026-04-03 18:26:23 +09:00
2026-04-10 19:23:10 +01:00
2026-04-09 03:56:22 +01:00
2026-03-29 09:10:38 +01:00
2026-04-04 15:44:34 +09:00
2026-04-12 12:41:18 +01:00
2026-04-03 23:26:31 +09:00
2026-03-29 09:10:38 +01:00
2026-03-31 11:12:47 +01:00
2026-04-12 18:40:04 +01:00
2026-03-24 15:48:35 +00:00
2026-03-29 09:10:38 +01:00
2026-04-05 09:23:55 +01:00
2026-03-24 15:48:35 +00:00
2026-04-11 13:02:56 +01:00
2026-04-11 13:02:56 +01:00
2026-04-10 08:05:56 +01:00
2026-03-27 02:12:56 -05:00
2026-04-11 12:50:45 +01:00
2026-04-11 12:50:45 +01:00
2026-03-29 09:10:38 +01:00
2026-04-06 04:17:52 +01:00
2026-04-11 01:27:48 +01:00
2026-04-12 09:09:50 +01:00
2026-04-12 05:19:56 +01:00
2026-04-07 05:06:54 +01:00
2026-04-04 07:39:53 +01:00
2026-03-26 23:20:26 +00:00
2026-03-26 23:20:26 +00:00
2026-04-10 23:37:23 +01:00
2026-04-11 01:27:48 +01:00
2026-03-30 00:15:08 +02:00
2026-04-05 18:31:02 +01:00
2026-04-07 05:06:54 +01:00
2026-04-05 07:58:02 +01:00
2026-04-11 01:01:30 +01:00
2026-04-04 16:49:21 +09:00
2026-04-10 11:36:39 +05:30
2026-04-04 16:49:21 +09:00
2026-04-03 14:26:01 +01:00
2026-04-08 00:09:07 +01:00
2026-04-10 20:56:43 +01:00
2026-04-08 11:47:59 +01:00
2026-04-08 11:25:35 +03:00
2026-04-06 17:42:42 +03:00
2026-04-08 11:25:35 +03:00
2026-04-08 11:25:35 +03:00
2026-04-11 01:01:30 +01:00
2026-04-08 11:25:35 +03:00
2026-04-07 05:06:54 +01:00
2026-04-06 19:31:16 +01:00
2026-03-27 15:16:19 -05:00
2026-03-23 17:38:08 -07:00
2026-04-06 16:52:41 +01:00
2026-04-12 00:22:32 +01:00
2026-04-02 19:06:37 +01:00
2026-04-11 16:10:13 +01:00
2026-04-07 23:09:26 -05:00
2026-03-23 17:38:08 -07:00
2026-04-03 15:40:07 +02:00
2026-04-03 15:40:07 +02:00
2026-04-03 15:40:07 +02:00
2026-04-01 19:16:46 +09:00
2026-04-06 19:52:42 +01:00
2026-04-06 18:10:44 +01:00
2026-04-08 21:01:53 +05:30
2026-03-30 20:28:32 -04:00
2026-04-10 20:28:48 +01:00
2026-04-12 04:56:21 +01:00
2026-04-07 10:35:24 +01:00
2026-04-10 20:56:43 +01:00
2026-04-07 05:06:54 +01:00
2026-04-11 12:34:57 -05:00
2026-04-06 17:23:35 +01:00
2026-04-07 09:45:11 +01:00
2026-04-11 12:53:56 +01:00
2026-04-06 15:25:34 +01:00
2026-04-10 13:44:51 +01:00
2026-04-05 17:05:20 +01:00
2026-04-05 23:20:17 +01:00
2026-04-01 23:28:11 -04:00
2026-04-12 05:32:52 +01:00
2026-04-12 05:35:52 +01:00
2026-04-10 13:44:51 +01:00
2026-04-12 04:39:25 +01:00
2026-04-06 17:51:21 +01:00
2026-04-10 14:59:25 -06:00
2026-04-07 05:06:54 +01:00
2026-04-07 10:35:24 +01:00
2026-04-10 15:41:28 +08:00
2026-03-26 09:31:59 -05:00
2026-04-12 00:22:32 +01:00
2026-04-08 15:58:45 +01:00
2026-04-08 15:58:45 +01:00
2026-04-09 00:29:24 +01:00
2026-04-03 12:45:13 +01:00
2026-04-06 17:21:52 +01:00
2026-04-07 05:06:54 +01:00
2026-04-12 04:54:36 +01:00
2026-04-10 13:44:51 +01:00
2026-04-11 21:36:45 -07:00
2026-04-08 07:15:51 +01:00
2026-04-07 07:59:45 +01:00
2026-04-09 00:29:24 +01:00
2026-04-10 10:52:35 +01:00
2026-04-11 00:13:08 +01:00
2026-04-09 00:29:24 +01:00
2026-04-10 09:47:57 +01:00
2026-04-09 00:29:24 +01:00
2026-04-10 13:44:51 +01:00
2026-04-10 13:44:51 +01:00
2026-04-12 12:46:20 +03:00
2026-04-06 15:16:17 +01:00
2026-04-12 12:46:20 +03:00
2026-04-04 01:07:28 +09:00
2026-04-10 13:44:51 +01:00
2026-04-03 12:45:13 +01:00
2026-04-12 04:56:21 +01:00
2026-04-05 10:34:02 +01:00
2026-04-07 05:06:54 +01:00
2026-04-10 19:28:42 +01:00
2026-04-08 21:16:49 +05:30
2026-04-02 14:35:05 +05:30
2026-04-06 16:55:50 +01:00
2026-04-10 19:28:42 +01:00
2026-04-05 23:24:27 +01:00
2026-04-06 16:52:41 +01:00
2026-04-09 10:13:20 +01:00
2026-04-11 16:10:13 +01:00
2026-04-07 05:06:54 +01:00
2026-04-07 12:19:49 +01:00