Skip to content

Commit

Permalink
fix(tclient): correct max retries
Browse files Browse the repository at this point in the history
The original value -1 is not "inf" (if retries >= e.maxRetries)
  • Loading branch information
iyear committed Jan 25, 2025
1 parent 8728f56 commit 095d652
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/tclient/tclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func New(ctx context.Context, o Options) (*telegram.Client, error) {
Device: tutil.Device,
SessionStorage: o.Session,
RetryInterval: 5 * time.Second,
MaxRetries: -1, // infinite retries
MaxRetries: 5,
DialTimeout: 10 * time.Second,
Middlewares: append(NewDefaultMiddlewares(ctx, o.ReconnectTimeout), o.Middlewares...),
Clock: tclock,
Expand Down

0 comments on commit 095d652

Please sign in to comment.