Skip to content

Commit

Permalink
added abort to the SCTPTransport Stop
Browse files Browse the repository at this point in the history
the association should send the abort message before closing the association as defined by the wbertc spec in step 6
https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close
  • Loading branch information
craymond12 committed Sep 6, 2024
1 parent e6a86e7 commit b19499c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sctptransport.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,14 @@ func (r *SCTPTransport) Start(SCTPCapabilities) error {
return nil
}

// Stop stops the SCTPTransport
// Stop send the abort message and stops the SCTPTransport
func (r *SCTPTransport) Stop() error {
r.lock.Lock()
defer r.lock.Unlock()
if r.sctpAssociation == nil {
return nil
}
r.sctpAssociation.Abort("")
err := r.sctpAssociation.Close()
if err != nil {
return err
Expand Down

0 comments on commit b19499c

Please sign in to comment.