chore: use jsonrpsee server crate directly (#12673)

This commit is contained in:
Matthias Seitz
2024-11-19 18:31:56 +01:00
committed by GitHub
parent 565fd4d133
commit d49f91378b
4 changed files with 8 additions and 7 deletions

View File

@ -21,7 +21,7 @@ metrics-util.workspace = true
tokio.workspace = true
jsonrpsee = { workspace = true, features = ["server"] }
jsonrpsee-server.workspace = true
http.workspace = true
tower.workspace = true

View File

@ -113,12 +113,12 @@ impl MetricServer {
let mut shutdown = signal.clone().ignore_guard();
tokio::task::spawn(async move {
if let Err(error) =
jsonrpsee::server::serve_with_graceful_shutdown(io, service, &mut shutdown)
let _ =
jsonrpsee_server::serve_with_graceful_shutdown(io, service, &mut shutdown)
.await
{
tracing::debug!(%error, "failed to serve request")
}
.inspect_err(
|error| tracing::debug!(%error, "failed to serve request"),
);
});
}
});