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

Unified Diff: webrtc/p2p/client/basicportallocator.cc

Issue 2599673003: If network enumeration fails, try binding to the "ANY" address. (Closed)
Patch Set: Getting rid of redundant test. Created 4 years 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 | « webrtc/base/network.h ('k') | webrtc/p2p/client/basicportallocator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/client/basicportallocator.cc
diff --git a/webrtc/p2p/client/basicportallocator.cc b/webrtc/p2p/client/basicportallocator.cc
index dbac0d3822ee08cc6453bf382bffd4aa9bf8c0f9..664701e100deb0eede31d8596b5dc7f5f524a731 100644
--- a/webrtc/p2p/client/basicportallocator.cc
+++ b/webrtc/p2p/client/basicportallocator.cc
@@ -551,6 +551,12 @@ std::vector<rtc::Network*> BasicPortAllocatorSession::GetNetworks() {
network_manager->GetAnyAddressNetworks(&networks);
} else {
network_manager->GetNetworks(&networks);
+ // If network enumeration fails, use the ANY address as a fallback, so we
+ // can at least try gathering candidates using the default route chosen by
+ // the OS.
+ if (networks.empty()) {
+ network_manager->GetAnyAddressNetworks(&networks);
+ }
}
networks.erase(std::remove_if(networks.begin(), networks.end(),
[this](rtc::Network* network) {
« no previous file with comments | « webrtc/base/network.h ('k') | webrtc/p2p/client/basicportallocator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698