mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-07-05 09:43:54 +02:00
iterator through resolver's results
This commit is contained in:
parent
ffd18baf30
commit
cc768de8ea
3 changed files with 8 additions and 12 deletions
libi2pd
|
@ -67,9 +67,9 @@ namespace util
|
|||
{
|
||||
bool found = false;
|
||||
boost::asio::ip::udp::endpoint ep;
|
||||
for (auto it = endpoints.begin (); it != endpoints.end ();)
|
||||
for (const auto& it: endpoints)
|
||||
{
|
||||
ep = *it;
|
||||
ep = it;
|
||||
if (!ep.address ().is_unspecified ())
|
||||
{
|
||||
if (ep.address ().is_v4 ())
|
||||
|
@ -86,7 +86,6 @@ namespace util
|
|||
}
|
||||
}
|
||||
if (found) break;
|
||||
it++;
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue