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/request_handler/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/request_handler/mod.rs') diff --git a/src/request_handler/mod.rs b/src/request_handler/mod.rs index 6812bb4..ec62ba3 100644 --- a/src/request_handler/mod.rs +++ b/src/request_handler/mod.rs @@ -1,5 +1,6 @@ #![allow(warnings)] +use std::sync::atomic; use std::cell::Cell; use std::collections::HashMap; use std::io; @@ -121,7 +122,8 @@ fn info<'a>(request_handler: &RequestHandler, state: &super::ApplicationState, let valid_cookies: Vec<(String, String)> = state.cookie_store.reader .map_into(|k, v| (k.to_string(), ftime(v[0] as i64))); - views::info_debug(path_rest, valid_cookies) + views::info_debug(path_rest, valid_cookies, + state.request_slowdown.load(atomic::Ordering::Acquire)) } else { views::info(path_rest) }; -- cgit v1.2.1