Catch DNS exceptions (rework - part 2). #618
This commit is contained in:
parent
39a5805491
commit
0ad83697f0
1 changed files with 20 additions and 10 deletions
|
|
@ -146,11 +146,16 @@ namespace detail {
|
|||
auto seeds = fc::json::from_string(seeds_str).as<vector<string>>();
|
||||
for( const string& endpoint_string : seeds )
|
||||
{
|
||||
std::vector<fc::ip::endpoint> endpoints = resolve_string_to_ip_endpoints(endpoint_string);
|
||||
for (const fc::ip::endpoint& endpoint : endpoints)
|
||||
{
|
||||
ilog("Adding seed node ${endpoint}", ("endpoint", endpoint));
|
||||
_p2p_network->add_node(endpoint);
|
||||
try {
|
||||
std::vector<fc::ip::endpoint> endpoints = resolve_string_to_ip_endpoints(endpoint_string);
|
||||
for (const fc::ip::endpoint& endpoint : endpoints)
|
||||
{
|
||||
ilog("Adding seed node ${endpoint}", ("endpoint", endpoint));
|
||||
_p2p_network->add_node(endpoint);
|
||||
}
|
||||
} catch( const fc::exception& e ) {
|
||||
wlog( "caught exception ${e} while adding seed node ${endpoint}",
|
||||
("e", e.to_detail_string())("endpoint", endpoint_string) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -177,11 +182,16 @@ namespace detail {
|
|||
};
|
||||
for( const string& endpoint_string : seeds )
|
||||
{
|
||||
std::vector<fc::ip::endpoint> endpoints = resolve_string_to_ip_endpoints(endpoint_string);
|
||||
for (const fc::ip::endpoint& endpoint : endpoints)
|
||||
{
|
||||
ilog("Adding seed node ${endpoint}", ("endpoint", endpoint));
|
||||
_p2p_network->add_node(endpoint);
|
||||
try {
|
||||
std::vector<fc::ip::endpoint> endpoints = resolve_string_to_ip_endpoints(endpoint_string);
|
||||
for (const fc::ip::endpoint& endpoint : endpoints)
|
||||
{
|
||||
ilog("Adding seed node ${endpoint}", ("endpoint", endpoint));
|
||||
_p2p_network->add_node(endpoint);
|
||||
}
|
||||
} catch( const fc::exception& e ) {
|
||||
wlog( "caught exception ${e} while adding seed node ${endpoint}",
|
||||
("e", e.to_detail_string())("endpoint", endpoint_string) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue