mirror of
https://github.com/livekit/livekit.git
synced 2026-08-01 15:49:56 +00:00
Close UDPMux when exit (#1064)
* Close UDPMux when exit * fix test failed
This commit is contained in:
+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