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

Fix packet handling before init #189

Merged
merged 1 commit into from
Mar 23, 2021
Merged

Conversation

at-wat
Copy link
Member

@at-wat at-wat commented Mar 23, 2021

It caused panic when some kind of packets are arrived before completing initialization.
Add error check to CookieEcho and Data handlers.

Reference issue

Fixes #188

@at-wat at-wat force-pushed the fix-packet-handling-before-init branch from 156e8a7 to a33d30d Compare March 23, 2021 11:22
@codecov
Copy link

codecov bot commented Mar 23, 2021

Codecov Report

Merging #189 (fa0e0eb) into master (4d8cfd4) will increase coverage by 1.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #189      +/-   ##
==========================================
+ Coverage   77.84%   78.88%   +1.03%     
==========================================
  Files          46       46              
  Lines        2609     2614       +5     
==========================================
+ Hits         2031     2062      +31     
+ Misses        440      417      -23     
+ Partials      138      135       -3     
Flag Coverage Δ
go 78.88% <100.00%> (+1.03%) ⬆️
wasm 65.34% <0.00%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
association.go 83.10% <100.00%> (+1.87%) ⬆️
chunk_payload_data.go 70.00% <100.00%> (+1.03%) ⬆️
chunk_error.go 56.00% <0.00%> (+4.00%) ⬆️
packet.go 72.83% <0.00%> (+4.93%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d8cfd4...fa0e0eb. Read the comment docs.

It caused panic when some kind of packets are arrived
before completing initialization.
Add error check to CookieEcho and Data handlers.
@at-wat at-wat force-pushed the fix-packet-handling-before-init branch from a33d30d to fa0e0eb Compare March 23, 2021 11:29
@at-wat at-wat requested review from jeremija, Sean-Der and enobufs March 23, 2021 11:32
Copy link
Member

@Sean-Der Sean-Der left a comment

Choose a reason for hiding this comment

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

Fantastic! Thanks for grabbing this @at-wat

@Sean-Der Sean-Der merged commit 3f82cfd into master Mar 23, 2021
@Sean-Der Sean-Der deleted the fix-packet-handling-before-init branch March 23, 2021 15:49
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

Successfully merging this pull request may close these issues.

panic in Association.handleCookieEcho
2 participants