From ffb45f7fe21e3371e31e2728ffee218adb1649bc Mon Sep 17 00:00:00 2001 From: cnderrauber Date: Thu, 31 Mar 2022 13:43:22 +0800 Subject: [PATCH] change client resume condition to disconnected, not failed (#583) --- pkg/rtc/participant.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/rtc/participant.go b/pkg/rtc/participant.go index d1804e79f..2bb03246c 100644 --- a/pkg/rtc/participant.go +++ b/pkg/rtc/participant.go @@ -983,7 +983,7 @@ func (p *ParticipantImpl) handlePrimaryStateChange(state webrtc.PeerConnectionSt p.SetMigrateState(types.MigrateStateComplete) } p.incActiveCounter() - } else if state == webrtc.PeerConnectionStateFailed { + } else if state == webrtc.PeerConnectionStateDisconnected { // clients support resuming of connections when websocket becomes disconnected p.closeSignalConnection() @@ -1019,7 +1019,7 @@ func (p *ParticipantImpl) handlePrimaryStateChange(state webrtc.PeerConnectionSt // for the secondary peer connection, we still need to handle when they become disconnected // instead of allowing them to silently fail. func (p *ParticipantImpl) handleSecondaryStateChange(state webrtc.PeerConnectionState) { - if state == webrtc.PeerConnectionStateFailed { + if state == webrtc.PeerConnectionStateDisconnected { // clients support resuming of connections when websocket becomes disconnected p.closeSignalConnection() }