fix(sfu): check empty reports with sdes chunks
@@ -269,8 +269,10 @@ func (s *Subscriber) sendStreamDownTracksReports(streamID string) {
sd = append(sd, dt.CreateSourceDescriptionChunks()...)
}
s.RUnlock()
+ if len(sd) == 0 {
+ return
+ }
r = append(r, &rtcp.SourceDescription{Chunks: sd})
- if len(r) > 0 {
go func() {
r := r
i := 0
@@ -286,4 +288,3 @@ func (s *Subscriber) sendStreamDownTracksReports(streamID string) {
}
}()
}
-}
