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
1 changed files with 6 additions and 2 deletions
|
@ -112,8 +112,12 @@ async fn main() -> ExitCode {
|
||||||
.route("/meta-data", get(get_meta_data))
|
.route("/meta-data", get(get_meta_data))
|
||||||
.route("/user-data", get(get_user_data))
|
.route("/user-data", get(get_user_data))
|
||||||
.with_state(ctx);
|
.with_state(ctx);
|
||||||
|
if let Err(err) = axum::serve(
|
||||||
if let Err(err) = axum::serve(http_sock, app).await {
|
http_sock,
|
||||||
|
app.into_make_service_with_connect_info::<SocketAddr>(),
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
{
|
||||||
tracing::error!("axum error: {err}");
|
tracing::error!("axum error: {err}");
|
||||||
return ExitCode::FAILURE;
|
return ExitCode::FAILURE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue