Kekma commited on
Commit
2149e32
1 Parent(s): 4a990c5

✨ feat: config option to timeout requests for fetching search results from the upstream search engines (#545)

Browse files
Files changed (1) hide show
  1. src/results/aggregator.rs +1 -0
src/results/aggregator.rs CHANGED
@@ -77,6 +77,7 @@ pub async fn aggregate(
77
  let client = CLIENT.get_or_init(|| {
78
  ClientBuilder::new()
79
  .timeout(Duration::from_secs(config.request_timeout as u64)) // Add timeout to request to avoid DDOSing the server
 
80
  .https_only(true)
81
  .gzip(true)
82
  .brotli(true)
 
77
  let client = CLIENT.get_or_init(|| {
78
  ClientBuilder::new()
79
  .timeout(Duration::from_secs(config.request_timeout as u64)) // Add timeout to request to avoid DDOSing the server
80
+ .connect_timeout(Duration::from_secs(config.request_timeout as u64)) // Add timeout to request to avoid DDOSing the server
81
  .https_only(true)
82
  .gzip(true)
83
  .brotli(true)