Skip to content

fix(gateway): retryable reconnects stop after prolonged network loss #12607

@denhubr

Description

@denhubr

Summary

After network connectivity was lost for a couple of hours, the Telegram gateway stopped reconnecting and never recovered on its own. Restarting the gateway was required to restore connectivity.

Reproduction

  1. Start the gateway with Telegram configured and connected.
  2. Simulate a prolonged infrastructure outage, for example by disabling networking or causing repeated DNS failures for a few hours.
  3. Wait for the reconnect loop to exhaust repeated retryable failures.
  4. Restore network connectivity.

Expected Behavior

The gateway should keep retrying retryable reconnect failures with backoff until connectivity returns or the adapter reports a non-retryable error.

Actual Behavior

The reconnect watcher gives up after repeated retryable failures, so the Telegram adapter remains disconnected permanently until the gateway is restarted.

Notes

This appears to affect transient infrastructure failures such as DNS resolution problems. The failure should remain queued for reconnect instead of being dropped after a fixed attempt limit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/gatewayGateway runner, session dispatch, deliveryplatform/telegramTelegram bot adaptertype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions