8000 Do not unwrap the oldest IP in QUIC connectiont table by pgarg66 · Pull Request #26272 · solana-labs/solana · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

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
(cherry picked from commit 31d870f)

Co-authored-by: Pankaj Garg <pankaj@solana.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
0