Skip to content

Commit

Permalink
fix for Boost 1.87.0
Browse files Browse the repository at this point in the history
Summary: Boost.Asio made basic_resolver_results' inheritance of basic_resolver_iterator private

Reviewers: ivica

Reviewed By: ivica

Subscribers: korina, miljen

Differential Revision: https://repo.mireo.local/D32797
  • Loading branch information
biljazovic committed Dec 16, 2024
1 parent 9a6788c commit 1225cc7
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions include/async_mqtt5/impl/reconnect_op.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,12 @@ class reconnect_op {
if (ec == asio::error::host_not_found)
return complete(asio::error::no_recovery);

connect(std::move(eps), std::move(ap));
connect(eps.cbegin(), std::move(ap));
}

void connect(epoints eps, authority_path ap) {
void connect(epoints::const_iterator eps, authority_path ap) {
namespace asioex = boost::asio::experimental;

if (eps.empty())
return do_reconnect();

const auto& ep = eps->endpoint();
auto sptr = _owner.construct_and_open_next_layer(ep.protocol());

Expand Down Expand Up @@ -210,7 +207,7 @@ class reconnect_op {

void operator()(
on_connect,
typename Owner::stream_ptr sptr, epoints eps, authority_path ap,
typename Owner::stream_ptr sptr, epoints::const_iterator eps, authority_path ap,
std::array<std::size_t, 2> ord,
error_code connect_ec, error_code timer_ec
) {
Expand All @@ -231,7 +228,7 @@ class reconnect_op {
// retry for operation timed out and any other error_code or client::error::malformed_packet
if (ord[0] == 1 || connect_ec) {
// if the hostname resolved into more endpoints, try the next one
if (++eps != eps.end())
if (++eps != epoints::const_iterator())
return connect(std::move(eps), std::move(ap));
// try next server
return do_reconnect();
Expand Down

0 comments on commit 1225cc7

Please sign in to comment.