Skip to content

Commit

Permalink
Removed error caused by Asio yield macros
Browse files Browse the repository at this point in the history
  • Loading branch information
anarthal committed Nov 2, 2023
1 parent c35b404 commit 45e6a3b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/unit/test/network_algorithms/run_algo_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <boost/asio/error.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/post.hpp>
#include <boost/asio/yield.hpp>
#include <boost/test/unit_test.hpp>

#include <cstddef>
Expand Down Expand Up @@ -170,12 +169,12 @@ struct mock_algo : sansio_algorithm, asio::coroutine

next_action resume(error_code ec)
{
reenter(*this)
BOOST_ASIO_CORO_REENTER(*this)
{
BOOST_TEST(ec == error_code());
st_->reader.prepare_read(seqnum);
st_->writer.prepare_write(mock_message{}, seqnum);
yield return act;
BOOST_ASIO_CORO_YIELD return act;
}
return next_action();
}
Expand Down

0 comments on commit 45e6a3b

Please sign in to comment.