pick-cat
e20a0039b3
fix(telegram): catch unhandled rejections in webhook and ingress worker shutdown ( #100998 )
...
* fix(telegram): isolate webhook/ingress-worker shutdown errors and guard all cleanup
- Wrap entire shutdown() body in outer try/catch so sync throws never
produce unhandled rejections from fire-and-forget abort listeners.
- bot.stop() rejection is caught and logged; finally block ensures
closeTransportOnce(), noteWebhookStop(), and stopDiagnosticHeartbeat()
always execute regardless of bot.stop() outcome.
- closeTransportOnce() rejection is caught independently in the finally
block so noteWebhookStop() and stopDiagnosticHeartbeat() are not skipped.
- Startup failure path: bot.stop() and closeTransportOnce() get
.catch(() => undefined) so cleanup rejections never mask the original
startup error.
- Both abort-listener call sites use consistent void shutdown() since
the never-reject contract is now internal.
- Ingress worker stop() shares an in-flight stopPromise for idempotency;
worker.terminate() rejections are observed via .catch(() => undefined).
Co-Authored-By: nebulacoder-v8.0 <noreply@zte.com.cn >
* fix(telegram): continue webhook cleanup after sync server.close throw
Extract independently guarded shutdown phases so a synchronous
server.close() failure still runs bot.stop, transport close, status,
and diagnostic heartbeat cleanup. Add sync-throw regression coverage
and a loopback real-behavior proof (negative/positive/valid).
* fix(telegram): clear webhook CI lint, knip, and test-types
Restore curly-safe drain timer clear, stop exporting the unused
shutdown phases interface, and narrow the transport close spy for
tsgo test types.
* chore(telegram): drop committed webhook shutdown proof script
* test(telegram): inline webhook shutdown proof cases without proof script
* fix(telegram): drop stale reply-fence import after main rebase
telegram-reply-fence.ts was deleted on main (f7786a16cf ) during the
core drain refactor. The rebased webhook.ts no longer calls these
functions; remove the dangling import so the module resolves.
Co-Authored-By: nebulacoder-v8.0 <noreply@zte.com.cn >
* fix(telegram): continue webhook shutdown after phase failures
Keep each fallible Telegram-owned teardown phase independent so an early failure cannot skip transport, ingress, status, or diagnostic cleanup.
Co-authored-by: Pick-cat <huang.ting3@xydigit.com >
---------
Co-authored-by: nebulacoder-v8.0 <noreply@zte.com.cn >
Co-authored-by: Vincent Koc <vincentkoc@ieee.org >
2026-07-30 01:21:12 +08:00
..
2026-07-16 21:54:11 +01:00
2026-07-22 21:14:53 -05:00
2026-07-18 19:59:02 +01:00
2026-07-02 21:48:29 -07:00
2026-06-04 22:03:15 -04:00
2026-06-25 00:09:45 +08:00
2026-07-18 06:27:59 +01:00
2026-07-18 06:27:59 +01:00
2026-07-27 03:49:37 -04:00
2026-07-14 22:20:46 -07:00
2026-07-14 22:20:46 -07:00
2026-07-27 03:49:37 -04:00
2026-07-18 06:27:59 +01:00
2026-07-25 05:30:52 -07:00
2026-07-22 21:14:53 -05:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-23 16:17:13 +00:00
2026-07-14 00:21:51 +01:00
2026-07-16 13:50:50 -07:00
2026-07-16 13:50:50 -07:00
2026-07-16 13:50:50 -07:00
2026-06-04 22:03:15 -04:00
2026-07-14 00:21:51 +01:00
2026-07-14 00:21:51 +01:00
2026-07-12 07:13:05 +01:00
2026-07-12 07:13:05 +01:00
2026-07-11 18:31:05 -07:00
2026-07-11 18:31:05 -07:00
2026-07-24 01:01:19 -07:00
2026-07-02 14:15:25 -07:00
2026-07-11 18:31:05 -07:00
2026-07-14 08:27:59 -07:00
2026-07-14 08:27:59 -07:00
2026-07-13 04:39:58 -07:00
2026-06-04 22:03:15 -04:00
2026-07-14 00:21:51 +01:00
2026-07-14 00:21:51 +01:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-09 11:11:35 +01:00
2026-07-19 07:35:45 -07:00
2026-07-11 18:31:05 -07:00
2026-06-04 22:03:15 -04:00
2026-07-13 09:28:55 -07:00
2026-07-17 22:24:17 +01:00
2026-07-13 09:28:55 -07:00
2026-07-13 09:28:55 -07:00
2026-07-13 09:28:55 -07:00
2026-07-13 09:28:55 -07:00
2026-07-13 09:28:55 -07:00
2026-07-17 22:24:17 +01:00
2026-07-18 03:32:39 -04:00
2026-07-20 22:28:21 -07:00
2026-06-04 22:03:15 -04:00
2026-07-29 01:38:15 -04:00
2026-07-28 06:57:02 +09:00
2026-07-16 08:46:34 -07:00
2026-07-20 07:31:10 -07:00
2026-07-04 14:54:43 -04:00
2026-07-04 14:54:43 -04:00
2026-07-24 22:38:09 -07:00
2026-07-27 07:45:02 -04:00
2026-07-27 07:04:48 +05:30
2026-07-20 07:31:10 -07:00
2026-07-22 01:16:35 -07:00
2026-07-21 23:45:01 -07:00
2026-07-13 09:28:55 -07:00
2026-07-13 09:28:55 -07:00
2026-06-04 22:03:15 -04:00
2026-07-13 09:28:55 -07:00
2026-07-14 22:20:46 -07:00
2026-07-14 22:20:46 -07:00
2026-07-04 14:56:50 -04:00
2026-06-04 22:03:15 -04:00
2026-07-23 11:45:40 -07:00
2026-07-21 20:28:43 -07:00
2026-07-23 11:45:40 -07:00
2026-06-04 22:03:15 -04:00
2026-07-14 22:20:46 -07:00
2026-07-27 00:42:00 -04:00
2026-07-20 07:31:10 -07:00
2026-06-04 22:03:15 -04:00
2026-07-14 00:21:51 +01:00
2026-07-23 11:45:40 -07:00
2026-06-08 14:50:48 +05:30
2026-07-27 11:27:53 +10:00
2026-07-14 19:43:18 -07:00
2026-07-27 11:27:53 +10:00
2026-06-04 22:03:15 -04:00
2026-07-10 08:26:33 +01:00
2026-07-14 00:21:51 +01:00
2026-07-24 01:01:19 -07:00
2026-07-02 19:01:22 -07:00
2026-07-27 00:42:00 -04:00
2026-06-04 22:03:15 -04:00
2026-07-23 11:45:40 -07:00
2026-07-20 07:31:10 -07:00
2026-07-14 00:21:51 +01:00
2026-07-10 08:26:33 +01:00
2026-07-22 03:54:28 -07:00
2026-07-27 11:27:53 +10:00
2026-07-12 12:48:22 +01:00
2026-07-09 07:32:55 +01:00
2026-07-27 11:27:53 +10:00
2026-07-22 21:14:53 -05:00
2026-07-29 06:18:35 -04:00
2026-07-28 08:12:17 +09:00
2026-07-24 20:05:30 -05:00
2026-07-15 03:25:54 -07:00
2026-07-22 03:54:28 -07:00
2026-07-28 08:12:17 +09:00
2026-07-19 05:30:54 -07:00
2026-07-27 11:27:53 +10:00
2026-07-27 11:27:53 +10:00
2026-07-22 21:14:53 -05:00
2026-07-22 21:14:53 -05:00
2026-07-28 23:36:19 -04:00
2026-07-17 10:12:54 +05:30
2026-07-15 10:38:37 -07:00
2026-07-29 04:19:43 -04:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-22 03:54:28 -07:00
2026-07-27 20:31:51 -05:00
2026-07-16 22:35:29 -07:00
2026-07-15 10:38:37 -07:00
2026-07-28 08:12:17 +09:00
2026-07-15 10:38:37 -07:00
2026-07-15 10:38:37 -07:00
2026-07-13 01:46:24 -07:00
2026-07-22 03:54:28 -07:00
2026-07-27 20:31:51 -05:00
2026-07-29 04:19:43 -04:00
2026-07-17 10:12:54 +05:30
2026-07-20 07:31:10 -07:00
2026-07-20 07:31:10 -07:00
2026-07-26 23:15:06 -05:00
2026-07-17 12:20:58 +01:00
2026-07-14 00:21:51 +01:00
2026-06-04 22:03:15 -04:00
2026-07-14 00:21:51 +01:00
2026-06-04 22:03:15 -04:00
2026-07-01 11:16:49 -07:00
2026-07-26 23:15:06 -05:00
2026-07-10 08:26:33 +01:00
2026-06-04 22:03:15 -04:00
2026-07-29 04:19:43 -04:00
2026-06-04 22:03:15 -04:00
2026-07-26 23:15:06 -05:00
2026-07-14 00:21:51 +01:00
2026-07-29 04:19:43 -04:00
2026-07-28 17:50:20 -04:00
2026-07-29 04:02:55 -04:00
2026-07-29 04:02:55 -04:00
2026-07-02 19:01:22 -07:00
2026-06-04 22:03:15 -04:00
2026-07-14 22:20:46 -07:00
2026-07-27 07:45:02 -04:00
2026-07-27 07:45:02 -04:00
2026-07-24 20:05:30 -05:00
2026-07-27 07:45:02 -04:00
2026-07-29 00:23:44 -04:00
2026-07-14 22:20:46 -07:00
2026-07-25 01:09:25 -07:00
2026-07-29 09:55:41 +09:00
2026-07-24 20:05:30 -05:00
2026-07-20 07:31:10 -07:00
2026-07-29 09:55:41 +09:00
2026-06-04 22:03:15 -04:00
2026-07-24 20:05:30 -05:00
2026-07-29 00:04:52 -04:00
2026-07-14 22:20:46 -07:00
2026-07-10 14:31:16 +01:00
2026-07-18 19:52:19 -06:00
2026-07-18 19:52:19 -06:00
2026-07-19 08:39:16 -07:00
2026-06-14 08:37:24 +08:00
2026-07-14 00:21:51 +01:00
2026-07-27 16:06:33 -04:00
2026-07-22 21:14:53 -05:00
2026-07-22 21:14:53 -05:00
2026-07-19 09:42:16 -07:00
2026-07-12 10:45:14 +01:00
2026-07-06 17:06:18 +01:00
2026-07-22 19:57:42 -04:00
2026-07-27 16:06:33 -04:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-22 23:01:47 -04:00
2026-07-22 23:01:47 -04:00
2026-07-29 04:42:23 -04:00
2026-06-04 22:03:15 -04:00
2026-07-14 00:21:51 +01:00
2026-07-18 19:52:27 +01:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-05 19:11:58 -07:00
2026-07-22 22:53:39 -04:00
2026-07-25 17:07:51 -07:00
2026-07-29 04:10:06 -04:00
2026-06-10 13:35:19 +05:30
2026-07-14 00:21:51 +01:00
2026-07-29 06:18:35 -04:00
2026-07-29 06:18:35 -04:00
2026-07-19 07:35:45 -07:00
2026-07-19 07:35:45 -07:00
2026-07-11 18:31:05 -07:00
2026-07-11 18:31:05 -07:00
2026-07-11 18:31:05 -07:00
2026-07-24 01:01:19 -07:00
2026-07-11 18:31:05 -07:00
2026-07-27 07:45:02 -04:00
2026-07-14 11:23:32 -07:00
2026-07-14 02:25:37 -07:00
2026-07-15 14:57:55 +05:30
2026-07-18 20:33:05 -07:00
2026-07-29 00:38:36 -04:00
2026-07-29 00:38:36 -04:00
2026-07-18 20:33:05 -07:00
2026-07-14 00:21:51 +01:00
2026-06-04 22:03:15 -04:00
2026-07-10 08:26:33 +01:00
2026-07-14 18:30:04 -07:00
2026-07-21 23:45:01 -07:00
2026-07-14 12:03:50 -07:00
2026-07-14 12:03:50 -07:00
2026-07-13 23:56:35 -07:00
2026-07-24 01:24:03 -05:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-06 08:37:16 -07:00
2026-06-04 22:03:15 -04:00
2026-07-14 00:21:51 +01:00
2026-06-25 00:09:45 +08:00
2026-06-04 22:03:15 -04:00
2026-07-06 20:17:41 +01:00
2026-07-18 19:52:19 -06:00
2026-07-18 19:52:19 -06:00
2026-06-04 22:03:15 -04:00
2026-07-10 18:25:54 -07:00
2026-07-14 09:27:02 -07:00
2026-07-13 04:39:58 -07:00
2026-06-04 22:03:15 -04:00
2026-07-20 07:31:10 -07:00
2026-07-22 21:14:53 -05:00
2026-07-22 21:14:53 -05:00
2026-07-27 07:04:48 +05:30
2026-07-27 07:04:48 +05:30
2026-07-12 09:36:22 +01:00
2026-07-24 22:38:09 -07:00
2026-07-24 22:38:09 -07:00
2026-07-10 18:32:04 -07:00
2026-07-12 09:17:31 +01:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-19 07:35:45 -07:00
2026-07-19 07:35:45 -07:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-16 00:45:23 -07:00
2026-07-14 22:20:46 -07:00
2026-07-14 00:21:51 +01:00
2026-07-22 19:05:00 -04:00
2026-06-04 22:03:15 -04:00
2026-07-22 03:27:06 +05:30
2026-07-27 09:05:14 -04:00
2026-07-19 01:44:15 -06:00
2026-07-27 09:05:14 -04:00
2026-07-18 19:52:19 -06:00
2026-07-22 21:14:53 -05:00
2026-07-24 22:38:09 -07:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-14 22:20:46 -07:00
2026-07-14 22:20:46 -07:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-14 22:20:46 -07:00
2026-07-28 17:50:20 -04:00
2026-07-27 17:21:03 +09:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-11 18:15:03 -07:00
2026-07-17 00:19:30 -07:00
2026-07-14 08:27:59 -07:00
2026-07-14 08:27:59 -07:00
2026-07-04 14:56:50 -04:00
2026-07-25 17:10:51 +08:00
2026-07-16 10:48:53 +05:30
2026-07-02 18:38:39 -07:00
2026-07-06 08:37:16 -07:00
2026-07-10 18:25:54 -07:00
2026-07-10 18:25:54 -07:00
2026-06-18 11:57:40 +08:00
2026-06-04 22:03:15 -04:00
2026-07-17 22:24:17 +01:00
2026-07-17 22:24:17 +01:00
2026-07-18 03:32:39 -04:00
2026-07-09 11:11:35 +01:00
2026-07-01 20:29:18 -07:00
2026-06-04 22:03:15 -04:00
2026-07-03 09:37:48 -07:00
2026-07-02 18:38:39 -07:00
2026-06-04 22:03:15 -04:00
2026-07-01 16:22:34 -07:00
2026-07-11 16:28:36 -07:00
2026-07-11 16:28:36 -07:00
2026-07-01 16:22:34 -07:00
2026-07-23 15:41:21 -07:00
2026-07-15 14:57:55 +05:30
2026-07-15 14:57:55 +05:30
2026-07-15 14:57:55 +05:30
2026-07-15 16:42:27 +05:30
2026-07-23 15:41:21 -07:00
2026-07-23 15:41:21 -07:00
2026-07-24 00:37:59 -07:00
2026-07-15 14:57:55 +05:30
2026-07-15 14:57:55 +05:30
2026-07-15 14:57:55 +05:30
2026-07-14 22:20:46 -07:00
2026-07-14 22:20:46 -07:00
2026-07-14 00:21:51 +01:00
2026-07-13 01:51:32 -07:00
2026-07-18 06:27:59 +01:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-25 00:18:28 -07:00
2026-07-23 23:38:37 -07:00
2026-07-25 00:18:28 -07:00
2026-07-23 23:38:37 -07:00
2026-07-25 00:18:28 -07:00
2026-07-23 23:38:37 -07:00
2026-07-23 23:38:37 -07:00
2026-07-23 23:38:37 -07:00
2026-07-25 00:18:28 -07:00
2026-07-02 18:45:48 -07:00
2026-07-25 00:18:28 -07:00
2026-06-17 18:56:25 +08:00
2026-07-15 14:57:55 +05:30
2026-06-04 22:03:15 -04:00
2026-07-15 14:57:55 +05:30
2026-07-28 07:08:08 -04:00
2026-07-12 18:24:13 -07:00
2026-07-23 23:38:37 -07:00
2026-07-27 08:20:32 -04:00
2026-07-27 08:20:32 -04:00
2026-07-24 22:38:09 -07:00
2026-07-17 22:24:17 +01:00
2026-07-17 22:24:17 +01:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-07 10:07:13 +01:00
2026-07-21 06:48:30 -07:00
2026-07-22 19:57:42 -04:00
2026-07-25 01:00:53 -07:00
2026-07-27 20:20:13 -04:00
2026-07-21 06:48:30 -07:00
2026-07-18 06:27:59 +01:00
2026-07-22 19:57:42 -04:00
2026-07-14 22:20:46 -07:00
2026-06-21 07:22:52 +08:00
2026-07-27 07:04:48 +05:30
2026-07-27 07:04:48 +05:30
2026-07-16 07:17:01 -07:00
2026-07-14 00:21:51 +01:00
2026-07-14 00:21:51 +01:00
2026-07-14 22:20:46 -07:00
2026-07-19 05:30:54 -07:00
2026-07-14 22:20:46 -07:00
2026-07-19 05:30:54 -07:00
2026-07-19 05:30:54 -07:00
2026-06-04 22:03:15 -04:00
2026-07-29 04:10:06 -04:00
2026-07-12 18:08:26 -07:00
2026-07-12 09:17:31 +01:00
2026-07-29 03:44:35 -04:00
2026-07-18 23:33:24 -07:00
2026-07-29 02:39:48 -04:00
2026-07-29 06:24:30 -04:00
2026-07-29 02:39:48 -04:00
2026-07-18 23:33:24 -07:00
2026-07-17 10:12:54 +05:30
2026-07-17 10:12:54 +05:30
2026-07-29 06:24:30 -04:00
2026-07-17 10:12:54 +05:30
2026-07-25 05:30:52 -07:00
2026-07-17 10:12:54 +05:30
2026-07-18 19:54:03 -07:00
2026-07-18 19:54:03 -07:00
2026-07-06 08:37:16 -07:00
2026-07-13 01:46:24 -07:00
2026-07-14 22:20:46 -07:00
2026-07-25 05:30:52 -07:00
2026-07-14 22:20:46 -07:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-29 12:59:42 +08:00
2026-07-18 06:27:59 +01:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-14 22:20:46 -07:00
2026-07-14 22:20:46 -07:00
2026-07-14 00:21:51 +01:00
2026-07-14 00:21:51 +01:00
2026-06-04 22:03:15 -04:00
2026-07-14 22:20:46 -07:00
2026-07-14 22:20:46 -07:00
2026-07-14 00:21:51 +01:00
2026-07-17 00:56:46 -07:00
2026-06-04 22:03:15 -04:00
2026-06-04 22:03:15 -04:00
2026-07-30 01:21:12 +08:00
2026-07-30 01:21:12 +08:00