File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2104,10 +2104,11 @@ func (pc *PeerConnection) addRTPTransceiver(t *RTPTransceiver) {
2104
2104
// by the ICEAgent since the offer or answer was created.
2105
2105
func (pc * PeerConnection ) CurrentLocalDescription () * SessionDescription {
2106
2106
pc .mu .Lock ()
2107
+ defer pc .mu .Unlock ()
2108
+
2107
2109
localDescription := pc .currentLocalDescription
2108
2110
iceGather := pc .iceGatherer
2109
2111
iceGatheringState := pc .ICEGatheringState ()
2110
- pc .mu .Unlock ()
2111
2112
return populateLocalCandidates (localDescription , iceGather , iceGatheringState )
2112
2113
}
2113
2114
@@ -2117,10 +2118,11 @@ func (pc *PeerConnection) CurrentLocalDescription() *SessionDescription {
2117
2118
// PeerConnection is in the stable state, the value is null.
2118
2119
func (pc * PeerConnection ) PendingLocalDescription () * SessionDescription {
2119
2120
pc .mu .Lock ()
2121
+ defer pc .mu .Unlock ()
2122
+
2120
2123
localDescription := pc .pendingLocalDescription
2121
2124
iceGather := pc .iceGatherer
2122
2125
iceGatheringState := pc .ICEGatheringState ()
2123
- pc .mu .Unlock ()
2124
2126
return populateLocalCandidates (localDescription , iceGather , iceGatheringState )
2125
2127
}
2126
2128
You can’t perform that action at this time.
0 commit comments