Skip to content

Commit b8fcf99

Browse files
stephanrotolanteSean-Der
authored andcommitted
Expose STUNGatherTimeout via SettingEngine
Resolves pion#2668
1 parent 9e25881 commit b8fcf99

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.19
55
require (
66
github.com/pion/datachannel v1.5.6
77
github.com/pion/dtls/v2 v2.2.10
8-
github.com/pion/ice/v3 v3.0.4
8+
github.com/pion/ice/v3 v3.0.5
99
github.com/pion/interceptor v0.1.27
1010
github.com/pion/logging v0.2.2
1111
github.com/pion/randutil v0.1.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ github.com/pion/datachannel v1.5.6/go.mod h1:1eKT6Q85pRnr2mHiWHxJwO50SfZRtWHTsNI
4343
github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s=
4444
github.com/pion/dtls/v2 v2.2.10 h1:u2Axk+FyIR1VFTPurktB+1zoEPGIW3bmyj3LEFrXjAA=
4545
github.com/pion/dtls/v2 v2.2.10/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE=
46-
github.com/pion/ice/v3 v3.0.4 h1:TqEdK0nWHm3vs76Rvgd7dpDKhGzagtZ7u+kt0b9ed/s=
47-
github.com/pion/ice/v3 v3.0.4/go.mod h1:GIQiugpGkBDvh18nhFLRoHgabZ9VSRJOaEPh1nHjdrs=
46+
github.com/pion/ice/v3 v3.0.5 h1:V6tNvpGS/vNJBWh3BEzQrwiPncOmLx7jbbSJM/2PFHE=
47+
github.com/pion/ice/v3 v3.0.5/go.mod h1:GIQiugpGkBDvh18nhFLRoHgabZ9VSRJOaEPh1nHjdrs=
4848
github.com/pion/interceptor v0.1.27 h1:mZ01OiGiukwRxezmDGzYjjokCVlDOk4T6BfaL5qrtGo=
4949
github.com/pion/interceptor v0.1.27/go.mod h1:/vVaqLwDjGv4GRbgmChIKZIT5EXFDijwmj4WmIYy9bI=
5050
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=

icegatherer.go

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ func (g *ICEGatherer) createAgent() error {
108108
SrflxAcceptanceMinWait: g.api.settingEngine.timeout.ICESrflxAcceptanceMinWait,
109109
PrflxAcceptanceMinWait: g.api.settingEngine.timeout.ICEPrflxAcceptanceMinWait,
110110
RelayAcceptanceMinWait: g.api.settingEngine.timeout.ICERelayAcceptanceMinWait,
111+
STUNGatherTimeout: g.api.settingEngine.timeout.ICESTUNGatherTimeout,
111112
InterfaceFilter: g.api.settingEngine.candidates.InterfaceFilter,
112113
IPFilter: g.api.settingEngine.candidates.IPFilter,
113114
NAT1To1IPs: g.api.settingEngine.candidates.NAT1To1IPs,

settingengine.go

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ type SettingEngine struct {
4141
ICESrflxAcceptanceMinWait *time.Duration
4242
ICEPrflxAcceptanceMinWait *time.Duration
4343
ICERelayAcceptanceMinWait *time.Duration
44+
ICESTUNGatherTimeout *time.Duration
4445
}
4546
candidates struct {
4647
ICELite bool
@@ -157,6 +158,11 @@ func (e *SettingEngine) SetRelayAcceptanceMinWait(t time.Duration) {
157158
e.timeout.ICERelayAcceptanceMinWait = &t
158159
}
159160

161+
// SetSTUNGatherTimeout sets the ICESTUNGatherTimeout
162+
func (e *SettingEngine) SetSTUNGatherTimeout(t time.Duration) {
163+
e.timeout.ICESTUNGatherTimeout = &t
164+
}
165+
160166
// SetEphemeralUDPPortRange limits the pool of ephemeral ports that
161167
// ICE UDP connections can allocate from. This affects both host candidates,
162168
// and the local address of server reflexive candidates.

0 commit comments

Comments
 (0)