Skip to content

Commit

Permalink
[asio] Add missing call to restart() after io_context run
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Oct 29, 2023
1 parent 392a01c commit 1cb6926
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ossia/network/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ struct network_context

void run()
{
using work_guard
= boost::asio::executor_work_guard<boost::asio::io_context::executor_type>;

work_guard wg{context.get_executor()};
auto wg = boost::asio::make_work_guard(context);
#if defined(__cpp_exceptions)
try
{
Expand All @@ -34,6 +31,7 @@ struct network_context
#else
context.run();
#endif
context.restart();
}
};
using network_context_ptr = std::shared_ptr<network_context>;
Expand Down

0 comments on commit 1cb6926

Please sign in to comment.