0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-22 22:18:23 -05:00

Fixed import issue in tcp_connection_keepalive

This commit is contained in:
KekmaTime 2024-03-22 04:23:00 +05:30
parent 4bd8afd70b
commit f3ce20be6b
2 changed files with 3 additions and 1 deletions

View File

@ -42,6 +42,8 @@ pub struct Config {
/// It stores the level of safe search to be used for restricting content in the /// It stores the level of safe search to be used for restricting content in the
/// search results. /// search results.
pub safe_search: u8, pub safe_search: u8,
/// It stores the TCP connection keepalive duration in seconds.
pub tcp_connection_keepalive: u64,
} }
impl Config { impl Config {
@ -131,6 +133,7 @@ impl Config {
upstream_search_engines: globals upstream_search_engines: globals
.get::<_, HashMap<String, bool>>("upstream_search_engines")?, .get::<_, HashMap<String, bool>>("upstream_search_engines")?,
request_timeout: globals.get::<_, u8>("request_timeout")?, request_timeout: globals.get::<_, u8>("request_timeout")?,
tcp_connection_keepalive: globals.get::<_, u64>("tcp_connection_keepalive")?,
threads, threads,
rate_limiter: RateLimiter { rate_limiter: RateLimiter {
number_of_requests: rate_limiter["number_of_requests"], number_of_requests: rate_limiter["number_of_requests"],

View File

@ -216,7 +216,6 @@ async fn results(
.filter_map(|engine| EngineHandler::new(engine).ok()) .filter_map(|engine| EngineHandler::new(engine).ok())
.collect::<Vec<EngineHandler>>(), .collect::<Vec<EngineHandler>>(),
safe_search_level, safe_search_level,
30,
) )
.await? .await?
} }