Fix race issue caused by multiple gathering

resolves #707
This commit is contained in:
Konstantin Itskov
2019-06-07 17:54:09 -04:00
committed by Sean DuBois
parent e357abf415
commit 8c7f769e86
7 changed files with 70 additions and 42 deletions

View File

@@ -30,6 +30,7 @@ type SettingEngine struct {
ICERelayAcceptanceMinWait *time.Duration
}
candidates struct {
ICETrickle bool
ICENetworkTypes []NetworkType
}
LoggerFactory logging.LoggerFactory
@@ -62,6 +63,12 @@ func (e *SettingEngine) SetEphemeralUDPPortRange(portMin, portMax uint16) error
return nil
}
// SetTrickle configures whether or not the ice agent should gather candidates
// via the trickle method or synchronously.
func (e *SettingEngine) SetTrickle(trickle bool) {
e.candidates.ICETrickle = trickle
}
// SetNetworkTypes configures what types of candidate networks are supported
// during local and server reflexive gathering.
func (e *SettingEngine) SetNetworkTypes(candidateTypes []NetworkType) {