Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error add overflow when reconnect #338

Closed
veerapatyok opened this issue Jun 16, 2023 · 5 comments
Closed

error add overflow when reconnect #338

veerapatyok opened this issue Jun 16, 2023 · 5 comments

Comments

@veerapatyok
Copy link
Contributor

I set max_reconnect_attempts is None(default) to infinity, delay is default and I got error add overflow in file client.rs line 164 (sorry an error are gone).

I see variable reconnect_attempts has type u8 (max is 255) and I think when reconnect is infinity it may get error add to overflow

Is it possible change reconnect_attempts += 1 to reconnect_attempts.wrapping_add(1) or ignore add when set max_reconnect_attempts is None ?

Thank you

@1c3t3a
Copy link
Owner

1c3t3a commented Jun 16, 2023

Fair assessment! Sounds like a reasonable fix, would you be interested in a PR? Otherwise I could open one. Although I would say your client is in a weird state if it reaches 255 reconnects, taking into account the exponential backoff.

@veerapatyok
Copy link
Contributor Author

veerapatyok commented Jun 16, 2023

Fair assessment! Sounds like a reasonable fix, would you be interested in a PR? Otherwise I could open one. Although I would say your client is in a weird state if it reaches 255 reconnects, taking into account the exponential backoff.

ok and please grant me because I got error 403 when I push. @1c3t3a

@1c3t3a
Copy link
Owner

1c3t3a commented Jun 25, 2023

You need to fork the repository and then create a PR :) The process is explained here: https://docs.github.com/de/get-started/quickstart/fork-a-repo

@veerapatyok
Copy link
Contributor Author

@1c3t3a I created PR #341 and please review

@1c3t3a
Copy link
Owner

1c3t3a commented Jun 26, 2023

Closed in #341

@1c3t3a 1c3t3a closed this as completed Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants