Skip to content

Commit

Permalink
fix start-web-server with async storage
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Oct 16, 2023
1 parent c8154ee commit 2582dbe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/web/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,10 @@ pub fn start_web_server(addr: Option<SocketAddr>, context: &dyn Context) -> Resu
context.storage()?;
context.repository_stats_updater()?;

let app = build_axum_app(context, template_data)?.into_make_service();
context.runtime()?.block_on(async {
axum::Server::bind(&axum_addr)
.serve(build_axum_app(context, template_data)?.into_make_service())
.serve(app)
.with_graceful_shutdown(shutdown_signal())
.await?;
Ok::<(), Error>(())
Expand Down

0 comments on commit 2582dbe

Please sign in to comment.