From 08fc0b380964d5913c8d9d573fcd83f5cfc6ea35 Mon Sep 17 00:00:00 2001 From: Anton Sotkov Date: Wed, 7 Jan 2026 03:13:25 +0200 Subject: [PATCH] fix: imsg unhandled promises --- src/imessage/monitor.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/imessage/monitor.ts b/src/imessage/monitor.ts index d6e1d42da..14884d862 100644 --- a/src/imessage/monitor.ts +++ b/src/imessage/monitor.ts @@ -444,9 +444,13 @@ export async function monitorIMessageProvider( const abort = opts.abortSignal; const onAbort = () => { if (subscriptionId) { - void client.request("watch.unsubscribe", { - subscription: subscriptionId, - }); + void client + .request("watch.unsubscribe", { + subscription: subscriptionId, + }) + .catch(() => { + // Ignore disconnect errors during shutdown. + }); } void client.stop(); };