properly cleanup downtracks on subscriber disconnect
This commit is contained in:
@@ -156,6 +156,9 @@ func (t *PCTransport) CreateAndSendOffer(options *webrtc.OfferOptions) error {
|
||||
if t.onOffer == nil {
|
||||
return nil
|
||||
}
|
||||
if t.pc.ConnectionState() == webrtc.PeerConnectionStateClosed {
|
||||
return nil
|
||||
}
|
||||
|
||||
state := t.negotiationState.Load().(int)
|
||||
// when there's an ongoing negotiation, let it finish and not disrupt its state
|
||||
|
||||
Reference in New Issue
Block a user