don't send empty pkts

This commit is contained in:
David Colburn
2021-06-21 15:54:42 -07:00
parent fee6f426bb
commit 31b4148052
2 changed files with 6 additions and 4 deletions
+2
View File
@@ -961,12 +961,14 @@ func (p *ParticipantImpl) rtcpSendWorker() {
}) })
} }
if len(fwdPkts) > 0 {
if err := p.publisher.pc.WriteRTCP(fwdPkts); err != nil { if err := p.publisher.pc.WriteRTCP(fwdPkts); err != nil {
logger.Errorw("could not write RTCP to participant", err, logger.Errorw("could not write RTCP to participant", err,
"participant", p.Identity()) "participant", p.Identity())
} }
} }
} }
}
type rtcpThrottle struct { type rtcpThrottle struct {
mu sync.RWMutex mu sync.RWMutex
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by Wire. DO NOT EDIT. // Code generated by Wire. DO NOT EDIT.
//go:generate wire //go:generate go run github.com/google/wire/cmd/wire
//+build !wireinject //+build !wireinject
package service package service