Created
August 2, 2019 00:23
-
-
Save Sean-Der/8677b050486699db61cce8d096dad887 to your computer and use it in GitHub Desktop.
This file contains 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
diff --git a/agent.go b/agent.go | |
index a36423e..bd2c60d 100644 | |
--- a/agent.go | |
+++ b/agent.go | |
@@ -596,6 +596,8 @@ func (a *Agent) taskLoop() { | |
} | |
} else { | |
select { | |
+ case <-a.forceCandidateContact: | |
+ a.selector.ContactCandidates() | |
case t := <-a.taskChan: | |
// Run the task | |
t(a) | |
@@ -709,6 +711,10 @@ func (a *Agent) addRemoteCandidate(c Candidate) { | |
a.addPair(localCandidate, c) | |
} | |
} | |
+ | |
+ if a.trickle { | |
+ a.forceCandidateContact <- true | |
+ } | |
} | |
// addCandidate assumes you are holding the lock (must be execute using a.run) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment