mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-26 14:45:52 +00:00
@@ -124,14 +124,8 @@ PAMNb1i80cMsjK98xXDdr+7Uvy5M4COMwA5XHmMZDEW8Jw==
|
||||
|
||||
class WebServerTest : public NoLoggerFixture
|
||||
{
|
||||
protected:
|
||||
WebServerTest()
|
||||
{
|
||||
work.emplace(ctx); // make sure ctx does not stop on its own
|
||||
runner.emplace([this] { ctx.run(); });
|
||||
}
|
||||
|
||||
~WebServerTest()
|
||||
public:
|
||||
~WebServerTest() override
|
||||
{
|
||||
work.reset();
|
||||
ctx.stop();
|
||||
@@ -139,6 +133,13 @@ protected:
|
||||
runner->join();
|
||||
}
|
||||
|
||||
protected:
|
||||
WebServerTest()
|
||||
{
|
||||
work.emplace(ctx); // make sure ctx does not stop on its own
|
||||
runner.emplace([this] { ctx.run(); });
|
||||
}
|
||||
|
||||
void
|
||||
SetUp() override
|
||||
{
|
||||
@@ -197,7 +198,7 @@ public:
|
||||
namespace {
|
||||
|
||||
template <class Executor>
|
||||
static std::shared_ptr<web::HttpServer<Executor>>
|
||||
std::shared_ptr<web::HttpServer<Executor>>
|
||||
makeServerSync(
|
||||
util::Config const& config,
|
||||
boost::asio::io_context& ioc,
|
||||
@@ -212,7 +213,7 @@ makeServerSync(
|
||||
boost::asio::dispatch(ioc.get_executor(), [&]() mutable {
|
||||
server = web::make_HttpServer(config, ioc, sslCtx, dosGuard, handler);
|
||||
{
|
||||
std::lock_guard lk(m);
|
||||
std::lock_guard const lk(m);
|
||||
ready = true;
|
||||
}
|
||||
cv.notify_one();
|
||||
|
||||
Reference in New Issue
Block a user