Skip to content

Commit

Permalink
Close peerconnection ice gatherer on close
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonVerkada committed Feb 2, 2024
1 parent 462a717 commit ffb5770
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion peerconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -2083,7 +2083,12 @@ func (pc *PeerConnection) Close() error {
// https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #7)
closeErrs = append(closeErrs, pc.dtlsTransport.Stop())

// https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #8, #9, #10)
// https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #8)
if pc.iceGatherer != nil {
closeErrs = append(closeErrs, pc.iceGatherer.Close())
}

// https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close (step #9, #10)
if pc.iceTransport != nil {
closeErrs = append(closeErrs, pc.iceTransport.Stop())
}
Expand Down

0 comments on commit ffb5770

Please sign in to comment.