File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -337,11 +337,8 @@ void MediaApiClient::CollectStats() {
337337 }
338338
339339 auto callback = webrtc::make_ref_counted<OnRTCStatsCollected>(
340- [this , safety = alive_flag_](
341- const webrtc::scoped_refptr<const webrtc::RTCStatsReport>& report) {
342- if (!safety->alive ()) {
343- return ;
344- }
340+ [this ](
341+ const webrtc::scoped_refptr<const webrtc::RTCStatsReport> &report) {
345342 MediaStatsChannelFromClient request = StatsRequestFromReport (
346343 report, stats_config_.stats_request_id , stats_config_.allowlist );
347344 stats_config_.stats_request_id ++;
@@ -357,7 +354,7 @@ void MediaApiClient::CollectStats() {
357354 // Closing the peer connection will cancel any pending and future tasks,
358355 // stopping stats collection.
359356 client_thread_->PostDelayedTask (
360- SafeTask (safety, [ this ]() { CollectStats (); }) ,
357+ [& ]() { CollectStats (); },
361358 webrtc::TimeDelta::Seconds (stats_config_.upload_interval ));
362359 });
363360 conference_peer_connection_->GetStats (callback.get ());
You can’t perform that action at this time.
0 commit comments