Fix /get_random_outs with Boost 1.87+

This commit is contained in:
Lee Clagett
2025-06-04 20:07:27 -04:00
committed by Lee *!* Clagett
parent 4e85e3c828
commit 95848bd75f
3 changed files with 14 additions and 2 deletions

View File

@@ -56,6 +56,7 @@ target_link_libraries(monero-lws-daemon-common
monero-lws-wire-json
monero-lws-util
${Boost_CHRONO_LIBRARY}
${Boost_CONTEXT_LIBRARY}
${Boost_COROUTINE_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_SYSTEM_LIBRARY}

View File

@@ -993,7 +993,18 @@ namespace lws
lock.unlock();
MDEBUG("Starting new ZMQ coroutine in /get_random_outs");
#if BOOST_VERSION >= 108000
{
auto token = [] (const std::exception_ptr& e)
{
if (e)
std::rethrow_exception(e);
};
boost::asio::spawn(active->strand, async_handler{active}, std::move(token));
}
#else
boost::asio::spawn(active->strand, async_handler{active});
#endif
return success();
}
};