ignore udp turn when force tls (#952)

This commit is contained in:
cnderrauber
2022-08-24 23:15:48 +08:00
committed by GitHub
parent 1350400c3a
commit 31d3d5e8b9
+1 -1
View File
@@ -589,7 +589,7 @@ func (r *RoomManager) iceServersForRoom(ri *livekit.Room, tlsOnly bool) []*livek
hasSTUN := false
if r.config.TURN.Enabled {
var urls []string
if r.config.TURN.UDPPort > 0 {
if r.config.TURN.UDPPort > 0 && !tlsOnly {
// UDP TURN is used as STUN
hasSTUN = true
urls = append(urls, fmt.Sprintf("turn:%s:%d?transport=udp", r.config.RTC.NodeIP, r.config.TURN.UDPPort))