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:
seelabs
2019-04-11 20:39:53 -04:00
committed by Manoj doshi
parent b39b0fef39
commit 6f9e8dc720
21 changed files with 727 additions and 451 deletions

View File

@@ -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)
{