From a223373fc12f151a5a80ee596cc6015a8e6dcc3d Mon Sep 17 00:00:00 2001 From: Markus Brueckner Date: Mon, 16 Jun 2025 18:48:59 +0200 Subject: [PATCH] disable HTTP keep-alive NX seems to freeze after some time when talking to a cache with HTTP keep-alive enabled --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 39bed5c..15513ab 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,7 +28,9 @@ async fn main() -> std::io::Result<()> { .service(handlers::get_cache_item) .service(handlers::put_cache_item) } - }); + }) + .keep_alive(None); // disable HTTP keep-alive because it seems to break NX (at least in version 20.8) + for bind_address in config.bind_addresses.unwrap_or(vec!["::0".to_string()]) { server = server .bind((bind_address.clone(), 8080))