mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Support Boost 1.70:
This patch removes calls to several deprecated asio functions. * `io_service::post` becomes `post` (free function) * `io_service::work` becomes `executor_work_guard` * `io_service::wrap` becomes `bind_executor` * `get_io_context` becomes `get_executor` or `get_executor().context()` This patch was tested with boost 1.69 and 1.70. The functions `ripple::get_lowest_layer` and `beast::create_waitable_timer` are required to handle a breaking difference between these versions. When rippled no longer needs to support pre 1.70 boost versions, both of these functions may be removed, and the waitable timer injections may also be removed.
This commit is contained in:
@@ -132,14 +132,14 @@ SSLHTTPDownloader::do_session(
|
||||
using namespace boost::beast;
|
||||
|
||||
boost::system::error_code ec;
|
||||
ip::tcp::resolver resolver {strand_.get_io_context()};
|
||||
ip::tcp::resolver resolver {strand_.context()};
|
||||
auto const results = resolver.async_resolve(host, port, yield[ec]);
|
||||
if (ec)
|
||||
return fail(dstPath, complete, ec, "async_resolve");
|
||||
|
||||
try
|
||||
{
|
||||
stream_.emplace(strand_.get_io_service(), ctx_);
|
||||
stream_.emplace(strand_.context(), ctx_);
|
||||
}
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user