Draft
Conversation
Change TLSConfig and DTLSConfig fields in DialConfig from value types to pointers (*tls.Config, *dtls.Config). This avoids copylocks warnings since tls.Config contains a sync.Mutex, and lets callers pass existing configs without dereferencing. DialURI handles nil by falling back to a zero-value config, and clones before mutating ServerName to avoid side effects. Fixes #235
Member
|
We should plan for a major stun upgrade soon, after we upgrade all of pion to turn@v5. |
Test that nil TLSConfig/DTLSConfig works, and that the caller's configs are not mutated by DialURI.
Author
|
I'll keep this PR in draft mode until we are ready for the next upgrade |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #269 +/- ##
==========================================
+ Coverage 65.91% 66.50% +0.59%
==========================================
Files 27 27
Lines 2077 2081 +4
==========================================
+ Hits 1369 1384 +15
+ Misses 697 683 -14
- Partials 11 14 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
@asayyah Hello, I think we can release a new major version soon after all the strict mode work and the API refactors, do you want to fix the conflicts and get this ready to review? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TLSConfigandDTLSConfigfields inDialConfigfrom value types (tls.Config,dtls.Config) to pointers (*tls.Config,*dtls.Config)//nolint:govet, copylockssuppression that was needed for the value-copy patternDialURIhandles nil configs by falling back to zero-value defaults, and clones before mutatingServerNameto avoid side effectsFixes #235
Test plan
go test -race ./...passesgo vet ./...clean (copylocks warning gone)golangci-lint run ./...reports 0 issuesgo build ./...compiles all packages and CLI tools