Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: webrtc/base/network.cc

Issue 1556743002: Bind a socket to a network if the network handle is set. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/app/webrtc/java/jni/peerconnection_jni.cc ('k') | webrtc/base/network_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/network.cc
diff --git a/webrtc/base/network.cc b/webrtc/base/network.cc
index 488c475137a2ee8d7ddbea1fa2ace59175cc3f36..be658dd7f384b8bb579dcfc850d2de3d1f8312f6 100644
--- a/webrtc/base/network.cc
+++ b/webrtc/base/network.cc
@@ -731,10 +731,13 @@ void BasicNetworkManager::StartNetworkMonitor() {
if (factory == nullptr) {
return;
}
- network_monitor_.reset(factory->CreateNetworkMonitor());
if (!network_monitor_) {
- return;
+ network_monitor_.reset(factory->CreateNetworkMonitor());
+ if (!network_monitor_) {
+ return;
+ }
}
+
network_monitor_->SignalNetworksChanged.connect(
this, &BasicNetworkManager::OnNetworksChanged);
network_monitor_->Start();
@@ -745,7 +748,6 @@ void BasicNetworkManager::StopNetworkMonitor() {
return;
}
network_monitor_->Stop();
- network_monitor_.reset();
}
void BasicNetworkManager::OnMessage(Message* msg) {
« no previous file with comments | « talk/app/webrtc/java/jni/peerconnection_jni.cc ('k') | webrtc/base/network_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698