Slight tweaks to subscription manager logging (#1345)

This commit is contained in:
David Zhao
2023-01-29 11:45:47 -08:00
committed by GitHub
parent 3a4a294a92
commit 21f816d23c
2 changed files with 9 additions and 3 deletions
+1
View File
@@ -19,6 +19,7 @@ var (
"discard message from", "discard message from",
"Failed to discover mDNS candidate", "Failed to discover mDNS candidate",
"Failed to read from candidate tcp", "Failed to read from candidate tcp",
"remote mDNS candidate added, but mDNS is disabled",
}, },
"pc": { "pc": {
"Failed to accept RTCP stream is already closed", "Failed to accept RTCP stream is already closed",
+8 -3
View File
@@ -301,12 +301,17 @@ func (m *SubscriptionManager) reconcileSubscription(s *trackSubscription) {
} }
default: default:
// all other errors // all other errors
s.logger.Warnw("failed to subscribe", err,
"attempt", s.numAttempts.Load(),
)
if s.durationSinceStart() > subscriptionTimeout { if s.durationSinceStart() > subscriptionTimeout {
s.logger.Errorw("failed to subscribe, triggering error handler", err,
"attempt", s.numAttempts.Load(),
)
s.maybeRecordError(m.params.Telemetry, m.params.Participant.ID(), err, false) s.maybeRecordError(m.params.Telemetry, m.params.Participant.ID(), err, false)
m.params.OnSubcriptionError(s.trackID) m.params.OnSubcriptionError(s.trackID)
} else {
s.logger.Debugw("failed to subscribe, retrying",
"error", err,
"attempt", s.numAttempts.Load(),
)
} }
} }
} else { } else {