Slight tweaks to subscription manager logging (#1345)
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user