iterator through resolver's results

This commit is contained in:
orignal
2024-11-25 19:16:42 -05:00
parent ffd18baf30
commit cc768de8ea
3 changed files with 8 additions and 12 deletions

View File

@@ -752,9 +752,9 @@ namespace client
boost::asio::ip::tcp::endpoint ep;
if (m_LocalAddress)
{
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 ())
@@ -773,7 +773,6 @@ namespace client
}
}
if (found) break;
it++;
}
}
else