Skip to content

Commit

Permalink
hold lock for checkNegotiationNeeded transceiver checks
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev committed Oct 23, 2020
1 parent b97c9b4 commit ebf2648
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion peerconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,10 @@ func (pc *PeerConnection) checkNegotiationNeeded() bool { //nolint:gocognit
return true
}

for _, t := range pc.GetTransceivers() {
pc.mu.Lock()
defer pc.mu.Unlock()

for _, t := range pc.rtpTransceivers {
// https://www.w3.org/TR/webrtc/#dfn-update-the-negotiation-needed-flag
// Step 5.1
// if t.stopping && !t.stopped {
Expand Down

0 comments on commit ebf2648

Please sign in to comment.