fix(telegram): reconnect long polling after disconnect#1455
fix(telegram): reconnect long polling after disconnect#1455Alix-007 wants to merge 2 commits intosipeed:mainfrom
Conversation
|
@Alix-007 I don't think this functionality is needed as long polling will stop only if context is closed, but in that case we don't need to restart it, so why this functionality is needed? |
|
The reconnect path here is only for runtime disconnects where the updates stream stops while the channel context is still alive. Issue #216 documents that case: the gateway stays marked connected, logs a reconnect message, and then stops receiving Telegram updates until process restart. So this does not restart after normal shutdown/cancel; runPollingLoop exits immediately once ctx.Err() != nil. It only re-establishes polling when bh.Start() returns with a live context after the updates channel has closed unexpectedly. I also pushed a small lint-only follow-up and re-ran:
|
|
Closing this for now. After re-checking the current implementation and the upstream
Given that, and given the PR is now conflicting with If we get a telego-specific reproducer or logs showing the updates stream really exits while the channel context is still alive, I can reopen this as a narrower follow-up. |
Summary
Fixes #216
Test plan