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

Prevent int underflow #2065

Merged
merged 4 commits into from
Dec 4, 2018
Merged

Prevent int underflow #2065

merged 4 commits into from
Dec 4, 2018

Conversation

ianswett
Copy link
Contributor

Fixes #2052

timeout = loss_time -
time_of_last_sent_retransmittable_packet
loss_detection_timer.set(loss_time)
return
else:
Copy link
Member

Choose a reason for hiding this comment

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

You don't need an else clause if you are going to exit. But this might set the timer to some time in the past if we're not careful with setting loss_time. I have a PR that might help inbound.

Copy link
Contributor

@janaiyengar janaiyengar left a comment

Choose a reason for hiding this comment

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

LGTM with removal of else

@ianswett ianswett merged commit bf69525 into master Dec 4, 2018
@martinthomson martinthomson deleted the ianswett-int-underflow branch December 13, 2018 04:51
@martinthomson martinthomson added design An issue that affects the design of the protocol; resolution requires consensus. -recovery labels Dec 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-recovery design An issue that affects the design of the protocol; resolution requires consensus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants