Skip to content

Commit

Permalink
Skip peer connection state error due to DTLS spam
Browse files Browse the repository at this point in the history
  • Loading branch information
sergystepanov committed Aug 1, 2023
1 parent 9f18cb5 commit 26cc0fc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/network/webrtc/webrtc.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,8 @@ func (p *Peer) Disconnect() {
return
}
if p.conn.ConnectionState() < webrtc.PeerConnectionStateDisconnected {
if err := p.conn.Close(); err != nil {
p.log.Error().Err(err).Msg("webrtc close fail")
}
// ignore this due to DTLS fatal: conn is closed
_ = p.conn.Close()
}
p.conn = nil
p.log.Debug().Msg("WebRTC stop")
Expand Down

0 comments on commit 26cc0fc

Please sign in to comment.