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

TimeoutOverflowWarning after many retries #44

Open
mhassan1 opened this issue May 9, 2023 · 0 comments · May be fixed by #45
Open

TimeoutOverflowWarning after many retries #44

mhassan1 opened this issue May 9, 2023 · 0 comments · May be fixed by #45

Comments

@mhassan1
Copy link

mhassan1 commented May 9, 2023

The maxDelay parameter defaults to Infinity:

maxDelay: +Infinity,

In the case where the computed delay is larger than the maximum 32-bit signed integer (2 ** 31 - 1), a TimeoutOverflowWarning is emitted by setTimeout, the value 1 is assumed, and we end up waiting only 1 millisecond before retrying, which causes frequent retries.

I have worked around this issue by passing:

socket: {
  reconnect: {
    maxDelay: 2 ** 31 - 1
  }
}
@mhassan1 mhassan1 linked a pull request May 9, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant