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

Do not unwrap the oldest IP in QUIC connectiont table #26272

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented Jun 27, 2022

Problem

Calling unwrap on oldest_ip while it's None is causing crash.

Summary of Changes

If the table is empty, or has no valid entry, the value of oldest_ip will be None.
This is a defensive check to use oldest_ip only when it is not None.

Fixes #26263

@pgarg66 pgarg66 requested a review from lijunwangs June 27, 2022 20:43
@pgarg66 pgarg66 marked this pull request as ready for review June 27, 2022 20:43
Copy link
Contributor

@lijunwangs lijunwangs left a comment

Choose a reason for hiding this comment

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

Looks good

@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #26272 (44cd266) into master (1165a7f) will increase coverage by 0.0%.
The diff coverage is 80.8%.

@@           Coverage Diff            @@
##           master   #26272    +/-   ##
========================================
  Coverage    81.9%    81.9%            
========================================
  Files         631      631            
  Lines      174252   175173   +921     
========================================
+ Hits       142728   143483   +755     
- Misses      31524    31690   +166     

@mergify mergify bot merged commit 31d870f into solana-labs:master Jun 28, 2022
mergify bot pushed a commit that referenced this pull request Jun 28, 2022
@pgarg66 pgarg66 deleted the issue-26263 branch June 28, 2022 00:17
mergify bot added a commit that referenced this pull request Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QUIC: thread 'tokio-runtime-worker' panicked at 'called Option::unwrap() .. quic
2 participants