aboutsummaryrefslogtreecommitdiff
path: root/jsonrpc/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'jsonrpc/src/client')
-rw-r--r--jsonrpc/src/client/builder.rs3
-rw-r--r--jsonrpc/src/client/mod.rs10
2 files changed, 3 insertions, 10 deletions
diff --git a/jsonrpc/src/client/builder.rs b/jsonrpc/src/client/builder.rs
index 4bfb5c3..a287070 100644
--- a/jsonrpc/src/client/builder.rs
+++ b/jsonrpc/src/client/builder.rs
@@ -50,7 +50,8 @@ pub struct ClientBuilder {
}
impl ClientBuilder {
- /// Set timeout for sending and receiving messages, in milliseconds.
+ /// Set timeout for receiving messages, in milliseconds. Requests will
+ /// fail if it takes longer.
///
/// # Examples
///
diff --git a/jsonrpc/src/client/mod.rs b/jsonrpc/src/client/mod.rs
index 05479f9..326252a 100644
--- a/jsonrpc/src/client/mod.rs
+++ b/jsonrpc/src/client/mod.rs
@@ -98,15 +98,7 @@ impl Client {
let req_json = serde_json::to_value(&request)?;
- match self.timeout {
- Some(ms) => {
- let t = Duration::from_millis(ms);
- timeout(t, self.conn.send(req_json)).await??;
- }
- None => {
- self.conn.send(req_json).await?;
- }
- }
+ self.conn.send(req_json).await?;
let (tx, rx) = async_channel::bounded(CHANNEL_CAP);
self.chans.lock().await.insert(id, tx);