Do not warn about track not bound if participant is not ready. (#4205)
Analysed half a dozen cases and all of them were due to participant is not active yet. Also, some misc logging changes.
This commit is contained in:
@@ -548,7 +548,7 @@ func (m *SubscriptionManager) reconcileSubscription(s *mediaTrackSubscription) {
|
||||
// check bound status, notify error callback if it's not bound
|
||||
// if a publisher leaves or closes the source track, SubscribedTrack will be closed as well and it will go
|
||||
// back to needsSubscribe state
|
||||
if s.durationSinceStart() > subscriptionTimeout {
|
||||
if m.params.Participant.IsReady() && s.durationSinceStart() > subscriptionTimeout {
|
||||
s.logger.Warnw("track not bound after timeout", nil)
|
||||
s.maybeRecordError(m.params.Telemetry, s.subscriberID, ErrTrackNotBound, false)
|
||||
m.params.OnSubscriptionError(s.trackID, true, ErrTrackNotBound)
|
||||
|
||||
@@ -691,7 +691,11 @@ func (f *Forwarder) SetRefSenderReport(layer int32, srData *livekit.RTCPSenderRe
|
||||
|
||||
if layer >= 0 && int(layer) < len(f.refInfos) {
|
||||
if layer == f.referenceLayerSpatial && f.refInfos[layer].senderReport == nil {
|
||||
f.logger.Debugw("received RTCP sender report for reference layer spatial", "layer", layer)
|
||||
f.logger.Debugw(
|
||||
"received RTCP sender report for reference layer spatial",
|
||||
"layer", layer,
|
||||
"srData", rtpstats.WrappedRTCPSenderReportStateLogger{RTCPSenderReportState: srData},
|
||||
)
|
||||
}
|
||||
f.refInfos[layer] = refInfo{srData, 0, false}
|
||||
|
||||
|
||||
@@ -902,6 +902,8 @@ func (r *ReceiverBase) forwardRTP(
|
||||
"layer", layer,
|
||||
"numPacketsForwarded", numPacketsForwarded,
|
||||
"numPacketsDropped", numPacketsDropped,
|
||||
"forwarderGeneration", forwarderGeneration,
|
||||
"forwardersGeneration", r.forwardersGeneration.Load(),
|
||||
)
|
||||
wg.Done()
|
||||
}()
|
||||
|
||||
@@ -193,6 +193,8 @@ func (w WrappedRTCPSenderReportStateLogger) MarshalLogObject(e zapcore.ObjectEnc
|
||||
return nil
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
func RTCPSenderReportPropagationDelay(rsrs *livekit.RTCPSenderReportState, passThrough bool) time.Duration {
|
||||
if passThrough {
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user