mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-23 06:38:53 +00:00
libwallet_api: fix unhandled exception on address check
This commit is contained in:
parent
1f73f80c94
commit
0019e3106b
@ -56,7 +56,8 @@ bool isAddressLocal(const std::string &address)
|
|||||||
LOG_PRINT_L1("Failed to determine whether daemon is local, assuming not");
|
LOG_PRINT_L1("Failed to determine whether daemon is local, assuming not");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// resolver::resolve can throw an exception
|
||||||
|
try {
|
||||||
// resolve to IP
|
// resolve to IP
|
||||||
boost::asio::io_service io_service;
|
boost::asio::io_service io_service;
|
||||||
boost::asio::ip::tcp::resolver resolver(io_service);
|
boost::asio::ip::tcp::resolver resolver(io_service);
|
||||||
@ -69,6 +70,9 @@ bool isAddressLocal(const std::string &address)
|
|||||||
return true;
|
return true;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
} catch (const boost::system::system_error &e) {
|
||||||
|
LOG_ERROR("Failed to resolve " << address << ", :" << e.what());
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user