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

Use monotonically increasing time for timeouts #316

Closed
ghost opened this issue Apr 11, 2022 · 1 comment
Closed

Use monotonically increasing time for timeouts #316

ghost opened this issue Apr 11, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 11, 2022

The code uses:

closedDate = Date.now()

Which is subject to clock drift, and NTP based adjustments on the server.

Please use monotonically increasing time from https://nodejs.org/api/process.html#processhrtimebigint or some such for the reconnect timeout value generation.

@porsager
Copy link
Owner

Ah, that's a great idea - Thank you.

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

1 participant