omyacid: Use into_make_service_with_connect_info

See https://docs.rs/axum/latest/axum/struct.Router.html#method.into_make_service_with_connect_info
This commit is contained in:
snow flurry 2024-08-14 21:22:57 -07:00
parent a54204a1ee
commit 04f4d625a6

View file

@ -112,8 +112,12 @@ async fn main() -> ExitCode {
.route("/meta-data", get(get_meta_data))
.route("/user-data", get(get_user_data))
.with_state(ctx);
if let Err(err) = axum::serve(http_sock, app).await {
if let Err(err) = axum::serve(
http_sock,
app.into_make_service_with_connect_info::<SocketAddr>(),
)
.await
{
tracing::error!("axum error: {err}");
return ExitCode::FAILURE;
}