Skip to content

Commit

Permalink
Merge pull request #1297 from gotd/fix/revert-options
Browse files Browse the repository at this point in the history
fix: revert retry and ping options
  • Loading branch information
ernado authored Jan 25, 2024
2 parents 95383b3 + 5a465b7 commit 52315ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/mtproto/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion telegram/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52315ff

Please sign in to comment.