修复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 {
case ICEConnectionStateDisconnected:
sub.Close()
rtc.Close()
case ICEConnectionStateConnected:
//rtc.videoTrack = rtc.GetSenders()[0].Track()