diff --git a/src/network_asio.cpp b/src/network_asio.cpp index 56f67618e1388..69cc830ed0bde 100644 --- a/src/network_asio.cpp +++ b/src/network_asio.cpp @@ -214,7 +214,12 @@ void connection::fallback_to_unencrypted() utils::get(socket_).close(); utils::get(socket_).async_connect(endpoint, - std::bind(&connection::handle_connect, this, std::placeholders::_1, endpoint)); +#if BOOST_VERSION >= 106600 + std::bind(&connection::handle_connect, this, std::placeholders::_1, endpoint) +#else + std::bind(&connection::handle_connect, this, std::placeholders::_1, resolver_.resolve(endpoint)) +#endif + ); } void connection::transfer(const config& request, config& response) diff --git a/src/wesnothd_connection.cpp b/src/wesnothd_connection.cpp index d9f705aecded1..ae3340b8ed858 100644 --- a/src/wesnothd_connection.cpp +++ b/src/wesnothd_connection.cpp @@ -259,7 +259,12 @@ void wesnothd_connection::fallback_to_unencrypted() utils::get(socket_).close(); utils::get(socket_).async_connect(endpoint, - std::bind(&wesnothd_connection::handle_connect, this, std::placeholders::_1, endpoint)); +#if BOOST_VERSION >= 106600 + std::bind(&wesnothd_connection::handle_connect, this, std::placeholders::_1, endpoint) +#else + std::bind(&wesnothd_connection::handle_connect, this, std::placeholders::_1, resolver_.resolve(endpoint)) +#endif + ); } // main thread