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 data race of RTX packet #2595

Merged
merged 2 commits into from
Oct 1, 2023
Merged

Fix data race of RTX packet #2595

merged 2 commits into from
Oct 1, 2023

Conversation

cnderrauber
Copy link
Member

When the TrackRemote.Read reads a rtx packet from the channel and copying the data from the buffer, the buffer can be written by the goroutine of receiveForRTX at the same time, use a buffer pool to fix it.

@codecov
Copy link

codecov bot commented Oct 1, 2023

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Files Coverage Δ
track_remote.go 80.31% <0.00%> (-0.64%) ⬇️
rtpreceiver.go 56.84% <0.00%> (-2.36%) ⬇️

... and 2 files with indirect coverage changes

📢 Thoughts on this report? Let us know!.

Fix data race of RTX packet
@adriancable
Copy link
Contributor

@cnderrauber - this is a good spot! Thanks for fixing, this looks good.

@adriancable adriancable merged commit 9e375c4 into master Oct 1, 2023
18 of 19 checks passed
@adriancable adriancable deleted the rtx_data_race branch October 1, 2023 17:56
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.

None yet

2 participants