Skip to content

Commit

Permalink
fix wrong error type
Browse files Browse the repository at this point in the history
failure to getinfo is an rpc error, not a peer error
  • Loading branch information
JssDWt authored and cdecker committed Oct 25, 2024
1 parent aaed0f0 commit 2cd4d07
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libs/gl-plugin/src/awaitables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,7 @@ async fn ensure_peer_connection(

async fn get_version(rpc_path: impl AsRef<Path>) -> Result<String, Error> {
let mut rpc = connect(rpc_path).await?;
let info = rpc
.call_typed(&GetinfoRequest {})
.await
.map_err(|_| Error::Peer("unable to connect"))?;
let info = rpc.call_typed(&GetinfoRequest {}).await?;
Ok(info.version)
}

Expand Down

0 comments on commit 2cd4d07

Please sign in to comment.