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:
parent
a54204a1ee
commit
04f4d625a6
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue