skip ICE restart if subscriber not connected
This commit is contained in:
@@ -406,6 +406,10 @@ func (p *ParticipantImpl) Negotiate() {
|
|||||||
|
|
||||||
// ICERestart restarts subscriber ICE connections
|
// ICERestart restarts subscriber ICE connections
|
||||||
func (p *ParticipantImpl) ICERestart() error {
|
func (p *ParticipantImpl) ICERestart() error {
|
||||||
|
if p.subscriber.pc.RemoteDescription() == nil {
|
||||||
|
// not connected, skip
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return p.subscriber.CreateAndSendOffer(&webrtc.OfferOptions{
|
return p.subscriber.CreateAndSendOffer(&webrtc.OfferOptions{
|
||||||
ICERestart: true,
|
ICERestart: true,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user