Skip to content

Commit e78daca

Browse files
Google Meet Teamcopybara-github
authored andcommitted
fix: Remove safety checks, breaks sample client
PiperOrigin-RevId: 858601553
1 parent 732d98c commit e78daca

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

cpp/internal/media_api_client.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff 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());

0 commit comments

Comments
 (0)