mirror of
https://github.com/iyear/tdl
synced 2025-04-04 22:33:36 +08:00
fix(tclient): correct max retries
The original value -1 is not "inf" (if retries >= e.maxRetries)
This commit is contained in:
parent
8728f5633f
commit
095d6520f5
@ -77,7 +77,7 @@ func New(ctx context.Context, o Options) (*telegram.Client, error) {
|
|||||||
Device: tutil.Device,
|
Device: tutil.Device,
|
||||||
SessionStorage: o.Session,
|
SessionStorage: o.Session,
|
||||||
RetryInterval: 5 * time.Second,
|
RetryInterval: 5 * time.Second,
|
||||||
MaxRetries: -1, // infinite retries
|
MaxRetries: 5,
|
||||||
DialTimeout: 10 * time.Second,
|
DialTimeout: 10 * time.Second,
|
||||||
Middlewares: append(NewDefaultMiddlewares(ctx, o.ReconnectTimeout), o.Middlewares...),
|
Middlewares: append(NewDefaultMiddlewares(ctx, o.ReconnectTimeout), o.Middlewares...),
|
||||||
Clock: tclock,
|
Clock: tclock,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user