From 5a465b731e062fa39982a70d10269d46a0050003 Mon Sep 17 00:00:00 2001 From: Aleksandr Razumov Date: Thu, 25 Jan 2024 11:28:42 +0300 Subject: [PATCH] fix: revert retry and ping options --- internal/mtproto/options.go | 4 ++-- telegram/options.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/mtproto/options.go b/internal/mtproto/options.go index 70c66ff68b..5b98bc9af4 100644 --- a/internal/mtproto/options.go +++ b/internal/mtproto/options.go @@ -131,10 +131,10 @@ func (opt *Options) setDefaults() { opt.SaltFetchInterval = 1 * time.Hour } if opt.PingTimeout == 0 { - opt.PingTimeout = 10 * time.Second + opt.PingTimeout = 15 * time.Second } if opt.PingInterval == 0 { - opt.PingInterval = 15 * time.Second + opt.PingInterval = 1 * time.Minute } if opt.RequestTimeout == nil { opt.RequestTimeout = func(req uint32) time.Duration { diff --git a/telegram/options.go b/telegram/options.go index 6e868181c5..0ac20a521d 100644 --- a/telegram/options.go +++ b/telegram/options.go @@ -146,7 +146,7 @@ func defaultBackoff(c clock.Clock) func() backoff.BackOff { return func() backoff.BackOff { b := backoff.NewExponentialBackOff() b.Clock = c - b.MaxElapsedTime = time.Minute + b.MaxElapsedTime = 0 b.InitialInterval = time.Millisecond * 100 b.MaxInterval = time.Second return b