Skip to content

Commit 2cd4d07

Browse files
JssDWtcdecker
authored andcommitted
fix wrong error type
failure to getinfo is an rpc error, not a peer error
1 parent aaed0f0 commit 2cd4d07

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

libs/gl-plugin/src/awaitables.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,7 @@ async fn ensure_peer_connection(
294294

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

0 commit comments

Comments
 (0)