mirror of
https://github.com/netbirdio/ice.git
synced 2026-05-22 17:10:58 -07:00
Improve Gathering error handling
Gather only asserted that it wasn't GatheringStateGathering. This meant that if gathering was complete it would allow multiple runs.
This commit is contained in:
@@ -97,7 +97,7 @@ func (a *Agent) GatherCandidates() error {
|
||||
gatherErrChan := make(chan error, 1)
|
||||
|
||||
runErr := a.run(func(agent *Agent) {
|
||||
if a.gatheringState == GatheringStateGathering {
|
||||
if a.gatheringState != GatheringStateNew {
|
||||
gatherErrChan <- ErrMultipleGatherAttempted
|
||||
return
|
||||
} else if a.onCandidateHdlr == nil {
|
||||
|
||||
Reference in New Issue
Block a user