mirror of
https://github.com/Monibuca/plugin-webrtc.git
synced 2025-10-05 23:06:55 +08:00
修复PeerConnection未释放导致UDP占用持续增长的bug
This commit is contained in:
1
main.go
1
main.go
@@ -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()
|
||||||
|
Reference in New Issue
Block a user