mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Provide IP address candidate list for LAN upgrade.
PiperOrigin-RevId: 825584250
This commit is contained in:
committed by
Copybara-Service
parent
389a1bc151
commit
8622fe7bf5
@@ -45,10 +45,7 @@ WifiLanServerSocket::~WifiLanServerSocket() { Close(); }
|
||||
|
||||
// Returns the first IP address.
|
||||
std::string WifiLanServerSocket::GetIPAddress() const {
|
||||
// The result of this function is used in BWU to let the remote side know
|
||||
// which IP to connect to.
|
||||
// server_socket_ is not bound to any addresses. So we need to pick an
|
||||
// IP address from the list of available addresses.
|
||||
// Just pick an IP address from the list of available addresses.
|
||||
std::vector<std::string> ip_addresses = GetIpv4Addresses();
|
||||
if (ip_addresses.empty()) {
|
||||
LOG(ERROR) << "No IP addresses found.";
|
||||
|
||||
Reference in New Issue
Block a user