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 race in datachannel handleOpen #2587

Merged
merged 1 commit into from
Sep 24, 2023

Conversation

sukunrt
Copy link
Member

@sukunrt sukunrt commented Sep 23, 2023

Description

The two variables used here are protected by the mutex mu they should only be accessed when the lock is held.

Reference issue

#2586

@Sean-Der
Copy link
Member

Thank you @sukunrt !

@codecov
Copy link

codecov bot commented Sep 23, 2023

Codecov Report

Patch coverage is 100.00% of modified lines.

Files Changed Coverage
datachannel.go 100.00%

📢 Thoughts on this report? Let us know!.

Take copy of bufferedAmountLowThreshold and onBufferedAmountLow.
This allows us to this later without holding the lock.
@Sean-Der Sean-Der merged commit 37c7e3c into pion:master Sep 24, 2023
18 checks passed
@Sean-Der
Copy link
Member

@sukunrt I tagged v3.2.21 for this

@sukunrt
Copy link
Member Author

sukunrt commented Sep 24, 2023

Oh wow, this is awesome! Thanks for the release @Sean-Der

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants