Add client config param IgnoreTURNResolveErrors#455
Add client config param IgnoreTURNResolveErrors#455amanakin wants to merge 2 commits intopion:masterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #455 +/- ##
==========================================
+ Coverage 67.43% 67.57% +0.13%
==========================================
Files 43 43
Lines 3083 3087 +4
==========================================
+ Hits 2079 2086 +7
+ Misses 843 841 -2
+ Partials 161 160 -1
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:
|
20a5223 to
a170ed1
Compare
d94f5e4 to
752326c
Compare
| Net transport.Net | ||
| LoggerFactory logging.LoggerFactory | ||
|
|
||
| IgnoreTURNResolveErrors bool // TURN server address is not required for some configurations (e.g. proxy) |
There was a problem hiding this comment.
I don't think we should add a config, there are many reason, but it feels like a single use flag.
What if we make a new constructor NewClientWithResolver and essentially make the nested condition after if len(config.TURNServerAddr) > 0 { customizable, we can then make the current NewClient call this new constructor with the old resolver logic.
There was a problem hiding this comment.
Even better, we can use Pion options, pattern, and make NewClientWithOptions and make a custom option WithResolver.
There was a problem hiding this comment.
@amanakin hello, sorry, I didn't get a notification for this, do you still wanna merge this?
Description
In some configurations we don't use the TURN address at the client side (e.g. proxy connection, see #450). But now at the client setup the provided turn address must be resolvable.
Adding client config param
IgnoreTURNResolveErrorsthat allows omit resolving errors when we don't need turn address.Also discussed here: pion/ice#773