mirror of
https://github.com/Monibuca/plugin-webrtc.git
synced 2025-10-05 23:06:55 +08:00
订阅者增加监听PeerConnectionStateClosed事件
This commit is contained in:
@@ -235,7 +235,7 @@ func (suber *WebRTCSubscriber) OnEvent(event any) {
|
||||
suber.PeerConnection.Close()
|
||||
}()
|
||||
}
|
||||
case PeerConnectionStateDisconnected, PeerConnectionStateFailed:
|
||||
case PeerConnectionStateDisconnected, PeerConnectionStateFailed, PeerConnectionStateClosed:
|
||||
suber.Stop(zap.String("reason", pcs.String()))
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user