Index: webrtc/api/peerconnection.cc |
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc |
index ebce40ca5eb0cf37d03243663826ea911eda06c3..f78825e69afa252cc81423154f9f8454fb6ea437 100644 |
--- a/webrtc/api/peerconnection.cc |
+++ b/webrtc/api/peerconnection.cc |
@@ -608,6 +608,8 @@ PeerConnection::~PeerConnection() { |
} |
// Destroy stats_ because it depends on session_. |
stats_.reset(nullptr); |
+ stats_collector_->WaitForPendingRequest(); |
hta-webrtc
2016/12/16 14:05:31
Doing waiting in a destructor makes me itchy. The
hbos
2016/12/16 14:34:52
I'm afraid not, PeerConnectionInterface is referen
hta-webrtc
2016/12/17 19:51:30
OK, the only thing that calls the destructor is th
|
+ stats_collector_ = nullptr; |
// Now destroy session_ before destroying other members, |
// because its destruction fires signals (such as VoiceChannelDestroyed) |
// which will trigger some final actions in PeerConnection... |