disable keep-alive: workaround for timeouting requests after auth error

This commit is contained in:
Lennart
2024-03-16 00:01:15 +01:00
parent 8f8fa99d8e
commit af870c305b

View File

@@ -1,4 +1,5 @@
use crate::config::Config; use crate::config::Config;
use actix_web::http::KeepAlive;
use actix_web::HttpServer; use actix_web::HttpServer;
use anyhow::Result; use anyhow::Result;
use app::make_app; use app::make_app;
@@ -56,6 +57,8 @@ async fn main() -> Result<()> {
HttpServer::new(move || make_app(cal_store.clone(), auth.clone())) HttpServer::new(move || make_app(cal_store.clone(), auth.clone()))
.bind((config.http.host, config.http.port))? .bind((config.http.host, config.http.port))?
// This is an unfortunate workaround for https://github.com/actix/actix-web/issues/1805
.keep_alive(KeepAlive::Disabled)
.run() .run()
.await?; .await?;