mirror of
https://github.com/livekit/livekit.git
synced 2026-05-25 12:04:47 +00:00
Declare migration complete after track publish callback. (#1436)
This commit is contained in:
@@ -1691,10 +1691,6 @@ func (p *ParticipantImpl) addMediaTrack(signalCid string, sdpCid string, ti *liv
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) handleTrackPublished(track types.MediaTrack) {
|
||||
if !p.hasPendingMigratedTrack() {
|
||||
p.SetMigrateState(types.MigrateStateComplete)
|
||||
}
|
||||
|
||||
p.lock.RLock()
|
||||
onTrackPublished := p.onTrackPublished
|
||||
p.lock.RUnlock()
|
||||
@@ -1710,6 +1706,10 @@ func (p *ParticipantImpl) handleTrackPublished(track types.MediaTrack) {
|
||||
p.Identity(),
|
||||
track.ToProto(),
|
||||
)
|
||||
|
||||
if !p.hasPendingMigratedTrack() {
|
||||
p.SetMigrateState(types.MigrateStateComplete)
|
||||
}
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) hasPendingMigratedTrack() bool {
|
||||
|
||||
Reference in New Issue
Block a user