修复PeerConnection未释放导致UDP占用持续增长的bug

This commit is contained in:
mqh
2020-08-31 11:07:11 +08:00
parent bd3f317033
commit 0c234bc896

View File

@@ -140,6 +140,7 @@ func (rtc *WebRTC) Play(streamPath string) bool {
switch connectionState { switch connectionState {
case ICEConnectionStateDisconnected: case ICEConnectionStateDisconnected:
sub.Close() sub.Close()
rtc.Close()
case ICEConnectionStateConnected: case ICEConnectionStateConnected:
//rtc.videoTrack = rtc.GetSenders()[0].Track() //rtc.videoTrack = rtc.GetSenders()[0].Track()