mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
chore: WebServerAdminTestsSuit TSAN issues (#2809)
This commit is contained in:
@@ -231,25 +231,7 @@ makeServerSync(
|
||||
std::reference_wrapper<data::LedgerCacheInterface const> cache
|
||||
)
|
||||
{
|
||||
auto server = std::shared_ptr<web::HttpServer<Executor>>();
|
||||
|
||||
std::mutex m;
|
||||
std::condition_variable cv;
|
||||
bool ready = false;
|
||||
|
||||
boost::asio::dispatch(ioc.get_executor(), [&]() mutable {
|
||||
server = web::makeHttpServer(config, ioc, dosGuard, handler, cache);
|
||||
{
|
||||
std::lock_guard const lk(m);
|
||||
ready = true;
|
||||
}
|
||||
cv.notify_one();
|
||||
});
|
||||
{
|
||||
std::unique_lock lk(m);
|
||||
cv.wait(lk, [&] { return ready; });
|
||||
}
|
||||
return server;
|
||||
return web::makeHttpServer(config, ioc, dosGuard, handler, cache);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user