Skip to content

Commit dc50480

Browse files
committed
Merge branch 'v3' into v3-viam
2 parents d0391f9 + a49914b commit dc50480

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

peerconnection.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,6 @@ func (pc *PeerConnection) close(shouldGracefullyClose bool) error {
20992099
}
21002100
if shouldGracefullyClose && !alreadyGracefullyClosed {
21012101
defer close(pc.isGracefulClosedDone)
2102-
pc.ops.GracefulClose()
21032102
}
21042103

21052104
// https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #3)
@@ -2156,6 +2155,8 @@ func (pc *PeerConnection) close(shouldGracefullyClose bool) error {
21562155
pc.updateConnectionState(pc.ICEConnectionState(), pc.dtlsTransport.State())
21572156

21582157
if shouldGracefullyClose {
2158+
pc.ops.GracefulClose()
2159+
21592160
// note that it isn't canon to stop gracefully
21602161
pc.sctpTransport.lock.Lock()
21612162
for _, d := range pc.sctpTransport.dataChannels {

0 commit comments

Comments
 (0)