aboutsummaryrefslogtreecommitdiff
path: root/jsonrpc/src/codec.rs
diff options
context:
space:
mode:
authorhozan23 <hozan23@proton.me>2024-03-13 02:07:31 +0100
committerhozan23 <hozan23@proton.me>2024-03-13 02:07:31 +0100
commitfc6fec0d8e69dac51e78b65dcc1a452c8a5b4901 (patch)
treed0330c6a9b08934aba2be48aa63f8883ca0db82f /jsonrpc/src/codec.rs
parent525a62c42fa3b3292a98ed5e8ec6703d9f2543f2 (diff)
jsonrpc: extend the example in the library
Diffstat (limited to 'jsonrpc/src/codec.rs')
-rw-r--r--jsonrpc/src/codec.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/jsonrpc/src/codec.rs b/jsonrpc/src/codec.rs
index 451cdb4..4a70412 100644
--- a/jsonrpc/src/codec.rs
+++ b/jsonrpc/src/codec.rs
@@ -94,7 +94,7 @@ impl Codec {
Ok(())
}
- pub async fn read_until_timeout(&self, buffer: &mut Vec<u8>, t: u64) -> Result<usize> {
+ pub async fn read_until_with_timeout(&self, buffer: &mut Vec<u8>, t: u64) -> Result<usize> {
timeout(std::time::Duration::from_secs(t), self.read_until(buffer)).await?
}
}