fallback to turn over tls when tcp short connection happen (#950)

* fallback to tls when tcp failed

* go mod

* magefile
This commit is contained in:
cnderrauber
2022-08-24 20:42:56 +08:00
committed by GitHub
parent 00b131da50
commit 1350400c3a
8 changed files with 68 additions and 32 deletions
+2 -2
View File
@@ -637,8 +637,8 @@ func (r *Room) SimulateScenario(participant types.LocalParticipant, simulateScen
case *livekit.SimulateScenario_SwitchCandidateProtocol:
r.Logger.Infow("simulating switch candidate protocol", "participant", participant.Identity())
participant.ICERestart(&types.IceConfig{
PreferSubTcp: scenario.SwitchCandidateProtocol == livekit.CandidateProtocol_TCP,
PreferPubTcp: scenario.SwitchCandidateProtocol == livekit.CandidateProtocol_TCP,
PreferSub: types.PreferCandidateType(scenario.SwitchCandidateProtocol),
PreferPub: types.PreferCandidateType(scenario.SwitchCandidateProtocol),
})
}
return nil