Skip to content

Commit

Permalink
chore: use jsonrpsee server crate directly
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Nov 19, 2024
1 parent 3408059 commit 343e001
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ if-addrs = "0.13"
# rpc
jsonrpsee = "0.24"
jsonrpsee-core = "0.24"
jsonrpsee-server = "0.24"
jsonrpsee-http-client = "0.24"
jsonrpsee-types = "0.24"

Expand Down
2 changes: 1 addition & 1 deletion crates/node/metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions crates/node/metrics/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
);
});
}
});
Expand Down

0 comments on commit 343e001

Please sign in to comment.