21 template<
class LogonT>
inline
27 template<
class ConnectFn>
inline void
29 if (connection_failed(cnx,
gateways.primary_gateway)) {
30 boost::exception_ptr cnx_failed(connection_failed(cnx,
gateways.secondary_gateway));
32 boost::rethrow_exception(cnx_failed);
38 template<
class ConnectFn>
inline boost::exception_ptr
39 connectivity_policy<LogonT>::connection_failed(ConnectFn
const &cnx, endpoint_t
const &endpoint)
noexcept(
true) {
40 boost::exception_ptr cnx_failed{};
43 cnx(boost::asio::ip::tcp::endpoint(endpoint.first, endpoint.second));
46 cnx_failed=
boost::current_exception();
47 std::this_thread::sleep_for(min_timeout);
54 template<
class ClientCxn>
57 : base_t(cxn, []() {
return typename base_t::hb_t{};}) {