client: use ping callback to determine if connection is still alive
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
@@ -198,6 +198,7 @@ func NewTelegramClient(ctx context.Context, tc *TelegramConnector, login *bridge
|
||||
OnDead: client.onDead,
|
||||
OnSession: client.onConnectionStateChange,
|
||||
OnConnected: client.onConnectionStateChange,
|
||||
PingCallback: client.onConnectionStateChange,
|
||||
OnAuthError: client.onAuthError,
|
||||
PingTimeout: time.Duration(tc.Config.Ping.TimeoutSeconds) * time.Second,
|
||||
PingInterval: time.Duration(tc.Config.Ping.IntervalSeconds) * time.Second,
|
||||
|
||||
Reference in New Issue
Block a user