diff --git a/src/ossia/network/context.hpp b/src/ossia/network/context.hpp index 923085f1ace..152ae1dfd37 100644 --- a/src/ossia/network/context.hpp +++ b/src/ossia/network/context.hpp @@ -14,10 +14,7 @@ struct network_context void run() { - using work_guard - = boost::asio::executor_work_guard; - - work_guard wg{context.get_executor()}; + auto wg = boost::asio::make_work_guard(context); #if defined(__cpp_exceptions) try { @@ -34,6 +31,7 @@ struct network_context #else context.run(); #endif + context.restart(); } }; using network_context_ptr = std::shared_ptr;