Remove STUN candidates, disconnect clients on ICE failed

This commit is contained in:
David Zhao
2021-06-28 12:47:16 -07:00
parent 815fd5066d
commit 343aec98a0
4 changed files with 6 additions and 14 deletions
+2 -1
View File
@@ -851,7 +851,8 @@ func (p *ParticipantImpl) handlePublisherICEStateChange(state webrtc.ICEConnecti
// "participant", p.identity)
if state == webrtc.ICEConnectionStateConnected {
p.updateState(livekit.ParticipantInfo_ACTIVE)
} else if state == webrtc.ICEConnectionStateDisconnected || state == webrtc.ICEConnectionStateFailed {
} else if state == webrtc.ICEConnectionStateFailed {
// only close when failed, to allow clients opportunity to reconnect
go func() {
_ = p.Close()
}()