From f098fdc99de724f53f7f129b6a5bde50b73fd797 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sun, 2 Dec 2018 13:52:23 +0100 Subject: request slowdown on login failure --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index a025e69..6cdf77a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,4 @@ -#![feature(test)] -#![feature(duration_as_u128)] - +#![feature(test,integer_atomics,duration_as_u128)] use std::sync::Arc; use std::thread; use std::sync::atomic; @@ -50,6 +48,7 @@ pub struct ApplicationState { cookie_store: CookieStore, cookie_max_age: Duration, debug: bool, + request_slowdown: Arc, } #[derive(Debug, StructOpt)] @@ -72,6 +71,7 @@ fn main() { cookie_store: CookieStore::new(), cookie_max_age: Duration::days(1), debug: opt.debug, + request_slowdown: Arc::new(atomic::AtomicU64::new(0)), }; let server_shutdown_condvar = Arc::new(atomic::AtomicBool::new(false)); -- cgit v1.2.1