mirror of
https://github.com/boostorg/mqtt5.git
synced 2025-07-30 12:37:36 +02:00
fix for Boost 1.87.0
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
This commit is contained in:
@ -160,15 +160,12 @@ public:
|
|||||||
if (ec == asio::error::host_not_found)
|
if (ec == asio::error::host_not_found)
|
||||||
return complete(asio::error::no_recovery);
|
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;
|
namespace asioex = boost::asio::experimental;
|
||||||
|
|
||||||
if (eps.empty())
|
|
||||||
return do_reconnect();
|
|
||||||
|
|
||||||
const auto& ep = eps->endpoint();
|
const auto& ep = eps->endpoint();
|
||||||
auto sptr = _owner.construct_and_open_next_layer(ep.protocol());
|
auto sptr = _owner.construct_and_open_next_layer(ep.protocol());
|
||||||
|
|
||||||
@ -210,7 +207,7 @@ public:
|
|||||||
|
|
||||||
void operator()(
|
void operator()(
|
||||||
on_connect,
|
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,
|
std::array<std::size_t, 2> ord,
|
||||||
error_code connect_ec, error_code timer_ec
|
error_code connect_ec, error_code timer_ec
|
||||||
) {
|
) {
|
||||||
@ -231,7 +228,7 @@ public:
|
|||||||
// retry for operation timed out and any other error_code or client::error::malformed_packet
|
// retry for operation timed out and any other error_code or client::error::malformed_packet
|
||||||
if (ord[0] == 1 || connect_ec) {
|
if (ord[0] == 1 || connect_ec) {
|
||||||
// if the hostname resolved into more endpoints, try the next one
|
// 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));
|
return connect(std::move(eps), std::move(ap));
|
||||||
// try next server
|
// try next server
|
||||||
return do_reconnect();
|
return do_reconnect();
|
||||||
|
Reference in New Issue
Block a user