mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 19:55:41 +00:00
Set participant active when peerconnection connected (#3790)
Don't wait datachannel ready (sctp handshake)
This commit is contained in:
@@ -1947,10 +1947,6 @@ func (p *ParticipantImpl) updateState(state livekit.ParticipantInfo_State) {
|
||||
}
|
||||
}
|
||||
|
||||
if state == livekit.ParticipantInfo_ACTIVE {
|
||||
p.replayJoiningReliableMessages()
|
||||
}
|
||||
|
||||
p.params.Logger.Debugw("updating participant state", "state", state.String())
|
||||
p.dirty.Store(true)
|
||||
|
||||
@@ -2351,15 +2347,17 @@ func (p *ParticipantImpl) onPrimaryTransportInitialConnected() {
|
||||
// else, wait for all tracks to be published and publisher peer connection established
|
||||
p.SetMigrateState(types.MigrateStateComplete)
|
||||
}
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) onPrimaryTransportFullyEstablished() {
|
||||
if !p.sessionStartRecorded.Swap(true) {
|
||||
prometheus.RecordSessionStartTime(int(p.ProtocolVersion()), time.Since(p.params.SessionStartTime))
|
||||
}
|
||||
p.updateState(livekit.ParticipantInfo_ACTIVE)
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) onPrimaryTransportFullyEstablished() {
|
||||
p.replayJoiningReliableMessages()
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) clearDisconnectTimer() {
|
||||
p.lock.Lock()
|
||||
if p.disconnectTimer != nil {
|
||||
|
||||
Reference in New Issue
Block a user