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 add streams after association is closed #348

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Do not add streams after association is closed #348

merged 1 commit into from
Aug 12, 2024

Conversation

edaniels
Copy link
Member

Without this, there's a race between OpenStream and the readLoop unregistering streams. When the race happens, a stream is leaked and will get stuck in a read loop waiting forever.

@edaniels edaniels requested a review from sukunrt August 12, 2024 18:15
Copy link

codecov bot commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.22%. Comparing base (15d9422) to head (b62e5ef).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #348      +/-   ##
==========================================
+ Coverage   81.20%   81.22%   +0.01%     
==========================================
  Files          51       51              
  Lines        3336     3339       +3     
==========================================
+ Hits         2709     2712       +3     
  Misses        481      481              
  Partials      146      146              
Flag Coverage Δ
go 81.22% <100.00%> (+0.01%) ⬆️
wasm 67.38% <33.33%> (-0.04%) ⬇️

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

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

association.go Outdated
Comment on lines 1509 to 1512
if a.getState() == closed {
return nil, ErrAssociationClosed
}
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to include the shutdown states here?

	shutdownAckSent
	shutdownPending
	shutdownReceived
	shutdownSent

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't strictly think so but it can't hurt

@edaniels edaniels merged commit 18c4015 into master Aug 12, 2024
13 checks passed
@edaniels edaniels deleted the osclose branch August 12, 2024 19:27
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.

2 participants