mirror of
https://github.com/livekit/livekit.git
synced 2026-07-28 09:59:26 +00:00
fix migrate state of subscribe only client (#366)
This commit is contained in:
@@ -1051,6 +1051,9 @@ func (p *ParticipantImpl) handleDataMessage(kind livekit.DataPacket_Kind, data [
|
||||
func (p *ParticipantImpl) handlePrimaryStateChange(state webrtc.PeerConnectionState) {
|
||||
if state == webrtc.PeerConnectionStateConnected {
|
||||
prometheus.ServiceOperationCounter.WithLabelValues("ice_connection", "success", "").Add(1)
|
||||
if !p.hasPendingMigratedTrack() && p.MigrateState() == types.MigrateStateSync {
|
||||
p.SetMigrateState(types.MigrateStateComplete)
|
||||
}
|
||||
p.updateState(livekit.ParticipantInfo_ACTIVE)
|
||||
} else if state == webrtc.PeerConnectionStateFailed {
|
||||
// only close when failed, to allow clients opportunity to reconnect
|
||||
|
||||
Reference in New Issue
Block a user