aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/rpc_client.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc/rpc_client.rs b/src/rpc/rpc_client.rs
index 3f943dcc..6119696d 100644
--- a/src/rpc/rpc_client.rs
+++ b/src/rpc/rpc_client.rs
@@ -328,10 +328,11 @@ impl RpcHttpClient {
);
e
})?;
- drop(slot);
let status = resp.status();
let body = hyper::body::to_bytes(resp.into_body()).await?;
+ drop(slot);
+
match rmp_serde::decode::from_read::<_, Result<M, String>>(body.into_buf())? {
Err(e) => Ok(Err(Error::RemoteError(e, status))),
Ok(x) => Ok(Ok(x)),