mirror of
https://github.com/XRPLF/clio.git
synced 2026-04-29 15:37:53 +00:00
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <web/IntervalSweepHandler.h>
|
||||
|
||||
#include <util/Constants.h>
|
||||
#include <web/DOSGuard.h>
|
||||
|
||||
#include <algorithm>
|
||||
@@ -27,7 +28,10 @@
|
||||
namespace web {
|
||||
|
||||
IntervalSweepHandler::IntervalSweepHandler(util::Config const& config, boost::asio::io_context& ctx)
|
||||
: sweepInterval_{std::max(1u, static_cast<uint32_t>(config.valueOr("dos_guard.sweep_interval", 1.0) * 1000.0))}
|
||||
: sweepInterval_{std::max(
|
||||
1u,
|
||||
static_cast<uint32_t>(
|
||||
config.valueOr("dos_guard.sweep_interval", 1.0) * static_cast<double>(util::MILLISECONDS_PER_SECOND)))}
|
||||
, ctx_{std::ref(ctx)}
|
||||
, timer_{ctx.get_executor()}
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user