client: Don't try to reconnect with canceled context
This commit is contained in:
@@ -506,7 +506,7 @@ func (t *TelegramClient) Connect(ctx context.Context) {
|
|||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
err = t.updatesManager.Run(t.clientCtx, t.client.API(), t.telegramUserID, updates.AuthOptions{})
|
err = t.updatesManager.Run(t.clientCtx, t.client.API(), t.telegramUserID, updates.AuthOptions{})
|
||||||
if err != nil {
|
if err != nil && !errors.Is(err, context.Canceled) {
|
||||||
zerolog.Ctx(t.clientCtx).Err(err).Msg("failed to run updates manager")
|
zerolog.Ctx(t.clientCtx).Err(err).Msg("failed to run updates manager")
|
||||||
t.Disconnect()
|
t.Disconnect()
|
||||||
t.Connect(t.main.Bridge.Log.WithContext(context.Background()))
|
t.Connect(t.main.Bridge.Log.WithContext(context.Background()))
|
||||||
|
|||||||
Reference in New Issue
Block a user