mirror of
https://github.com/livekit/livekit.git
synced 2026-10-23 00:02:53 +00:00
fix subscribe only client migrate with data channel (#579)
This commit is contained in:
1 parent
f694dad105
commit
3f5d4df65d
1 file changed
+1
-3
@@ -597,9 +597,6 @@ func (p *ParticipantImpl) SetMigrateState(s types.MigrateState) {
|
||||
var pendingOffer *webrtc.SessionDescription
|
||||
p.migrateState.Store(s)
|
||||
if s == types.MigrateStateSync {
|
||||
if !p.hasPendingMigratedTrack() {
|
||||
p.migrateState.Store(types.MigrateStateComplete)
|
||||
}
|
||||
pendingOffer = p.pendingOffer
|
||||
p.pendingOffer = nil
|
||||
// in case of migration, subscriber data channel will not fire OnOpen callback
|
||||
@@ -1547,6 +1544,7 @@ func (p *ParticipantImpl) handlePendingDataChannels() {
|
||||
if err != nil {
|
||||
p.params.Logger.Errorw("create migrated data channel failed", err, "label", ci.Label)
|
||||
} else if dc != nil {
|
||||
p.params.Logger.Debugw("create migrated data channel", "label", dc.Label(), "id", dc.ID())
|
||||
p.onDataChannel(dc)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user