Skip to content

Don't crash when hitting long backoffs. #458

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

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

Lukasa
Copy link
Collaborator

@Lukasa Lukasa commented Oct 13, 2021

Motivation:

If we backoff sufficiently far we can overflow Int64, which will cause
us to crash.

Modifications:

Clamp the backoff value before we convert to Int64.

Results:

No crashes!
Resolves #457

@Lukasa Lukasa added the 🔨 semver/patch No public API change. label Oct 13, 2021
@Lukasa Lukasa requested review from dnadoba and fabianfett October 13, 2021 11:01
Copy link
Contributor

@weissi weissi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Motivation:

If we backoff sufficiently far we can overflow Int64, which will cause
us to crash.

Modifications:

Clamp the backoff value before we convert to Int64.

Results:

No crashes!
@Lukasa Lukasa force-pushed the cb-crash-on-double branch from 0389db0 to 04e67c2 Compare October 13, 2021 11:25
@weissi weissi merged commit 1081b0b into swift-server:main Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
2 participants