Skip to content

miniproto.connection.sender.MTProtoSender.ping

miniproto.connection.sender.MTProtoSender.ping

Section titled “miniproto.connection.sender.MTProtoSender.ping”
ping() -> Pong

Send a retry-safe ping_delay_disconnect and require its Pong.

Returns:

  • Pong – Telegram’s matching :class:Pong.

Raises:

  • TransportError – If the request fails, times out, or returns a body other than Pong.
Notes

The keepalive task invokes this on its fixed cadence to prevent idle read deadlines and refresh Telegram’s ping-disconnect timer.