change client resume condition to disconnected, not failed (#583)

This commit is contained in:
cnderrauber
2022-03-31 13:43:22 +08:00
committed by GitHub
parent 7dc90e805c
commit ffb45f7fe2
+2 -2
View File
@@ -983,7 +983,7 @@ func (p *ParticipantImpl) handlePrimaryStateChange(state webrtc.PeerConnectionSt
p.SetMigrateState(types.MigrateStateComplete) p.SetMigrateState(types.MigrateStateComplete)
} }
p.incActiveCounter() p.incActiveCounter()
} else if state == webrtc.PeerConnectionStateFailed { } else if state == webrtc.PeerConnectionStateDisconnected {
// clients support resuming of connections when websocket becomes disconnected // clients support resuming of connections when websocket becomes disconnected
p.closeSignalConnection() 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 // for the secondary peer connection, we still need to handle when they become disconnected
// instead of allowing them to silently fail. // instead of allowing them to silently fail.
func (p *ParticipantImpl) handleSecondaryStateChange(state webrtc.PeerConnectionState) { func (p *ParticipantImpl) handleSecondaryStateChange(state webrtc.PeerConnectionState) {
if state == webrtc.PeerConnectionStateFailed { if state == webrtc.PeerConnectionStateDisconnected {
// clients support resuming of connections when websocket becomes disconnected // clients support resuming of connections when websocket becomes disconnected
p.closeSignalConnection() p.closeSignalConnection()
} }