Log errors on sending offer/answer (#933)

* Log errors on sending offer/answer

* minor clean up

* remove unneeded logs

* fix test
This commit is contained in:
Raja Subramanian
2022-08-19 17:54:27 +05:30
committed by GitHub
parent e4e2e4189b
commit fae3857800
3 changed files with 39 additions and 31 deletions
+3 -4
View File
@@ -485,6 +485,7 @@ func (p *ParticipantImpl) onPublisherAnswer(answer webrtc.SessionDescription) {
prometheus.ServiceOperationCounter.WithLabelValues("answer", "error", "write_message").Add(1)
return
}
prometheus.ServiceOperationCounter.WithLabelValues("answer", "success", "").Add(1)
p.TransportManager.PublisherLocalDescriptionSent()
if p.isPublisher.Load() != p.CanPublish() {
@@ -501,8 +502,6 @@ func (p *ParticipantImpl) onPublisherAnswer(answer webrtc.SessionDescription) {
}
}
prometheus.ServiceOperationCounter.WithLabelValues("answer", "success", "").Add(1)
if p.MigrateState() == types.MigrateStateSync {
go p.handleMigrateMutedTrack()
}
@@ -1076,9 +1075,9 @@ func (p *ParticipantImpl) onSubscriberOffer(offer webrtc.SessionDescription) {
})
if err != nil {
prometheus.ServiceOperationCounter.WithLabelValues("offer", "error", "write_message").Add(1)
} else {
prometheus.ServiceOperationCounter.WithLabelValues("offer", "success", "").Add(1)
return
}
prometheus.ServiceOperationCounter.WithLabelValues("offer", "success", "").Add(1)
p.TransportManager.SubscriberLocalDescriptionSent()
}