From fe48d60d2b63a9914297558bd5dbccae8d96c947 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 7 Feb 2024 14:33:07 +0100 Subject: [dep-upgrade-202402] refactor http listener code --- src/garage/server.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/garage') diff --git a/src/garage/server.rs b/src/garage/server.rs index ac76a44d..de8ac9e2 100644 --- a/src/garage/server.rs +++ b/src/garage/server.rs @@ -113,12 +113,11 @@ pub async fn run_server(config_file: PathBuf, secrets: Secrets) -> Result<(), Er if let Some(web_config) = &config.s3_web { info!("Initializing web server..."); + let web_server = WebServer::new(garage.clone(), web_config.root_domain.clone()); servers.push(( "Web", - tokio::spawn(WebServer::run( - garage.clone(), + tokio::spawn(web_server.run( web_config.bind_addr.clone(), - web_config.root_domain.clone(), wait_from(watch_cancel.clone()), )), )); -- cgit v1.2.3