mirror of
https://github.com/livekit/livekit.git
synced 2026-05-04 05:15:31 +00:00
Suppress negotiation timout log if signal disconnect (#1433)
* Suppress negotiation timout log if signal disconnect * solve comment
This commit is contained in:
@@ -1962,7 +1962,9 @@ func (p *ParticipantImpl) onSubscriptionError(trackID livekit.TrackID) {
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) onAnyTransportNegotiationFailed() {
|
||||
p.params.Logger.Infow("negotiation failed, starting full reconnect")
|
||||
if p.TransportManager.SinceLastSignal() < negotiationFailedTimeout {
|
||||
p.params.Logger.Infow("negotiation failed, starting full reconnect")
|
||||
}
|
||||
p.IssueFullReconnect(types.ParticipantCloseReasonNegotiateFailed)
|
||||
}
|
||||
|
||||
|
||||
@@ -717,3 +717,9 @@ func (t *TransportManager) UpdateLastSeenSignal() {
|
||||
t.lastSignalAt = time.Now()
|
||||
t.lock.Unlock()
|
||||
}
|
||||
|
||||
func (t *TransportManager) SinceLastSignal() time.Duration {
|
||||
t.lock.RLock()
|
||||
defer t.lock.RUnlock()
|
||||
return time.Since(t.lastSignalAt)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user