Skip to content

Commit

Permalink
Network Asio: conditionally use io_context::restart on Boost >= 1.66
Browse files Browse the repository at this point in the history
This is the replacement for the deprecated reset()
  • Loading branch information
Vultraz committed Dec 6, 2020
1 parent b185033 commit e69a9d5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/network_asio.cpp
Expand Up @@ -130,7 +130,11 @@ void connection::handle_handshake(const boost::system::error_code& ec)

void connection::transfer(const config& request, config& response)
{
#if BOOST_VERSION >= 106600
io_context_.restart();
#else
io_context_.reset();
#endif
done_ = false;

write_buf_.reset(new boost::asio::streambuf);
Expand Down

0 comments on commit e69a9d5

Please sign in to comment.