Skip to content

Commit

Permalink
Merge branch 'v3' into v3-viam
Browse files Browse the repository at this point in the history
  • Loading branch information
edaniels committed Aug 14, 2024
2 parents d0391f9 + a49914b commit dc50480
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion peerconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -2099,7 +2099,6 @@ func (pc *PeerConnection) close(shouldGracefullyClose bool) error {
}
if shouldGracefullyClose && !alreadyGracefullyClosed {
defer close(pc.isGracefulClosedDone)
pc.ops.GracefulClose()
}

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

if shouldGracefullyClose {
pc.ops.GracefulClose()

// note that it isn't canon to stop gracefully
pc.sctpTransport.lock.Lock()
for _, d := range pc.sctpTransport.dataChannels {
Expand Down

0 comments on commit dc50480

Please sign in to comment.