fix(telegram): add client-side timeout to #confirmPersistedOffset getUpdates

This commit is contained in:
Daniel
2026-03-19 11:14:53 +01:00
committed by Peter Steinberger
parent a732b916f4
commit 45ffb6cc25

View File

@@ -210,7 +210,10 @@ export class TelegramPollingSession {
return;
}
try {
await bot.api.getUpdates({ offset: lastUpdateId + 1, limit: 1, timeout: 0 });
await bot.api.getUpdates(
{ offset: lastUpdateId + 1, limit: 1, timeout: 0 },
{ signal: AbortSignal.timeout(10000) },
);
} catch {
// Non-fatal: runner middleware still skips duplicates via shouldSkipUpdate.
}