Use a worker to report signal/data stats. (#2260)
* Use a worker to report signal/data stats. Was checking if reporting is needed on every update. The check is wasted work if volume of signal/data messages is high as reporting happens only once in 10 seconds. Changing to a worker based on a timer. And also aligning with telemetry reporting interval which defaults to 30 seconds. * Remove unused constant
This commit is contained in:
@@ -269,7 +269,7 @@ func (s *RTCService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
close(done)
|
||||
|
||||
if signalStats != nil {
|
||||
signalStats.Report()
|
||||
signalStats.Stop()
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user