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

Don't panic on race condition in client info updating #173

Merged
merged 7 commits into from
Jan 13, 2024

Conversation

UkoeHB
Copy link
Collaborator

@UkoeHB UkoeHB commented Jan 12, 2024

This line would panic erroneously due to a race condition between despawns and client acks: .expect("tick should be inserted on any component insertion");.

I moved the implementation details of ClientInfo inside its impl. One reason this bug occurred is the implementation logic was not self-contained so it was hard to reason about.

@UkoeHB UkoeHB requested a review from Shatur January 12, 2024 20:56
@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5de3a92) 89.90% compared to head (4afbe1d) 89.94%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #173      +/-   ##
==========================================
+ Coverage   89.90%   89.94%   +0.03%     
==========================================
  Files          19       19              
  Lines        1209     1213       +4     
==========================================
+ Hits         1087     1091       +4     
  Misses        122      122              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Shatur Shatur left a comment

Choose a reason for hiding this comment

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

Thanks, nice!

UkoeHB and others added 3 commits January 12, 2024 16:10
Copy link
Contributor

@Shatur Shatur left a comment

Choose a reason for hiding this comment

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

Could you resolve conflicts with master?

@Shatur Shatur enabled auto-merge (squash) January 12, 2024 23:48
@Shatur Shatur merged commit b96fc72 into projectharmonia:master Jan 13, 2024
5 checks passed
@UkoeHB UkoeHB deleted the fix_client_info branch January 13, 2024 00:00
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.

3 participants