mirror of
https://github.com/livekit/livekit.git
synced 2026-10-22 13:12:09 +00:00
Close UDPMux when exit (#1064)
* Close UDPMux when exit * fix test failed
This commit is contained in:
1 parent
550514554f
commit
716f27c435
2 files changed
+4
-1
No files matched your search
+1
-1
@@ -78,7 +78,7 @@ func NewWebRTCConfig(conf *config.Config, externalIP string) (*WebRTCConfig, err
|
||||
rtcConf.PacketBufferSize = 500
|
||||
}
|
||||
|
||||
var udpMux *ice.UDPMuxDefault
|
||||
var udpMux ice.UDPMux
|
||||
var udpMuxConn *net.UDPConn
|
||||
var err error
|
||||
networkTypes := make([]webrtc.NetworkType, 0, 4)
|
||||
|
||||
@@ -196,6 +196,9 @@ func (r *RoomManager) Stop() {
|
||||
}
|
||||
|
||||
if r.rtcConfig != nil {
|
||||
if r.rtcConfig.UDPMux != nil {
|
||||
_ = r.rtcConfig.UDPMux.Close()
|
||||
}
|
||||
if r.rtcConfig.UDPMuxConn != nil {
|
||||
_ = r.rtcConfig.UDPMuxConn.Close()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user