Files
openclaw/extensions
Arseniy Palagin bdfe2a4e60 fix(telegram): polling worker pins a CPU core when the Bot API answers empty getUpdates instantly (#111063)
* fix(telegram): pace fast empty ingress polls

Some Bot API deployments (notably self-hosted telegram-bot-api servers and
intermediary proxies) can answer getUpdates immediately instead of holding
the connection for the requested long-poll timeout. With no pending updates
that turns the polling ingress worker loop into a busy spin: each empty
poll completes in milliseconds and the next one starts right away, pinning
a CPU core.

Enforce a 1s floor between consecutive empty getUpdates cycles, measured
from poll start so responses that honor the long-poll timeout are never
delayed. The wait listens to the worker stop signal, keeping shutdown
immediate. Non-empty polls are not paced, so pending traffic still drains
at full speed.

* fix(telegram): adapt empty poll backoff

---------

Co-authored-by: Arseniy Palagin <valeradzigurda3@gmail.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-18 19:54:03 -07:00
..