mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-11-29 18:27:43 +08:00
Fixed logic error of limiterExpireTime_
(#1605)
This commit is contained in:
parent
abf6f6cc86
commit
87a3132fd1
@ -77,7 +77,7 @@ void Hodor::initAndStart(const Json::Value &config)
|
||||
config.get("rejection_message", "Too many requests").asString());
|
||||
rejectResponse_->setCloseConnection(true);
|
||||
limiterExpireTime_ =
|
||||
(std::min)(static_cast<size_t>(
|
||||
(std::max)(static_cast<size_t>(
|
||||
config.get("limiter_expire_time", 600).asUInt()),
|
||||
static_cast<size_t>(timeUnit_.count() * 3));
|
||||
limitStrategies_.emplace_back(makeLimitStrategy(config));
|
||||
|
Loading…
Reference in New Issue
Block a user