File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2114,10 +2114,11 @@ func (pc *PeerConnection) addRTPTransceiver(t *RTPTransceiver) {
2114
2114
// by the ICEAgent since the offer or answer was created.
2115
2115
func (pc * PeerConnection ) CurrentLocalDescription () * SessionDescription {
2116
2116
pc .mu .Lock ()
2117
+ defer pc .mu .Unlock ()
2118
+
2117
2119
localDescription := pc .currentLocalDescription
2118
2120
iceGather := pc .iceGatherer
2119
2121
iceGatheringState := pc .ICEGatheringState ()
2120
- pc .mu .Unlock ()
2121
2122
return populateLocalCandidates (localDescription , iceGather , iceGatheringState )
2122
2123
}
2123
2124
@@ -2127,10 +2128,11 @@ func (pc *PeerConnection) CurrentLocalDescription() *SessionDescription {
2127
2128
// PeerConnection is in the stable state, the value is null.
2128
2129
func (pc * PeerConnection ) PendingLocalDescription () * SessionDescription {
2129
2130
pc .mu .Lock ()
2131
+ defer pc .mu .Unlock ()
2132
+
2130
2133
localDescription := pc .pendingLocalDescription
2131
2134
iceGather := pc .iceGatherer
2132
2135
iceGatheringState := pc .ICEGatheringState ()
2133
- pc .mu .Unlock ()
2134
2136
return populateLocalCandidates (localDescription , iceGather , iceGatheringState )
2135
2137
}
2136
2138
You can’t perform that action at this time.
0 commit comments