8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bebc74d commit 48078d2Copy full SHA for 48078d2
peer/conn.go
@@ -297,7 +297,9 @@ func (c *Conn) negotiate() {
297
c.pendingCandidatesMutex.Unlock()
298
299
if !c.offerrer {
300
+ // Lock new candidates from processing until we set the local description.
301
c.pendingCandidatesMutex.Lock()
302
+ defer c.pendingCandidatesMutex.Unlock()
303
304
answer, err := c.rtc.CreateAnswer(&webrtc.AnswerOptions{})
305
if err != nil {
@@ -320,7 +322,6 @@ func (c *Conn) negotiate() {
320
322
321
323
// Wait until the local description is set to flush candidates.
324
c.flushPendingCandidates()
- c.pendingCandidatesMutex.Unlock()
325
}
326
327
0 commit comments