-
Notifications
You must be signed in to change notification settings - Fork 159
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 regression with UDPMuxDefault and NAT1To1IPs #550
Conversation
36c996d
to
323538b
Compare
323538b
to
d9e0b24
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #550 +/- ##
==========================================
+ Coverage 78.00% 78.16% +0.15%
==========================================
Files 39 39
Lines 4283 4291 +8
==========================================
+ Hits 3341 3354 +13
+ Misses 732 728 -4
+ Partials 210 209 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Thanks @aler9! Thats great :) I have two smaller comments on your PR. And, I've noticed that the PR is based on an outdated Thanks a lot :) |
d9e0b24
to
6bf84d5
Compare
d614af0
to
0af1e3c
Compare
Hello @stv0g, i have applied all the requested changes and i can confirm that this fixes #505. Furthermore, the PR adds a unit test with the exact use case (UDPDefaultMux + NAT1To1). The question is that UDPMux is used in two ways:
Personally i don't have a preference and it's not my role to decide, but i'd like for both methods to continue working in order not to break existing code. |
Thanks @aler9, It looks good now. We can ignore the failing CI tests for Go 1.18. I will @cnderrauber some time to also review the change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for improving this!
PR pion#496 added a mechanism to close connections of duplicate candidates and avoid memory leaks. When UDPMuxDefault and NAT1To1IPs are used together, candidates may share the same connection, and candidates may be equal, since their IPs are overridden by the one specified in NAT1To1IPs. When a duplicate candidate is found, its connection is closed, making impossible to use any other candidate that shares the same connection. This PR fixes the issue as it prevents duplicate candidates from creating connections and getting their connection closed.
0af1e3c
to
ce83595
Compare
i applied all the suggested changes. |
Description
PR #496 added a mechanism to close connections of duplicate candidates and avoid memory leaks. When UDPMuxDefault and NAT1To1IPs are used together, candidates may share the same connection, and candidates may be equal, since their IPs are overridden by the one specified in NAT1To1IPs. When a duplicate candidate is found, its connection is closed, making impossible to use any other candidate that shares the same connection.
This PR fixes the issue as it prevents duplicate candidates from creating connections and getting their connection closed.
Reference issue
Fixes #505
Related to bluenviron/mediamtx#1680