mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-10-15 02:52:27 +00:00
A handler whose row was re-leased while it sat between heartbeats (a >=120 s stall) still ran the channel forward, opened the edit prompt and released the keep-alive temp media the new holder was using; only the terminal write was token-guarded, which left the side effects to run twice. The lease is now exposed to the handler on a task-local (Lease/lease_still_held) and the completion path re-reads it, since the loss may have gone unnoticed by the heartbeat. The forward retry is gated the same way.