From fc6fec0d8e69dac51e78b65dcc1a452c8a5b4901 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Wed, 13 Mar 2024 02:07:31 +0100 Subject: jsonrpc: extend the example in the library --- jsonrpc/src/codec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jsonrpc/src/codec.rs') 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, t: u64) -> Result { + pub async fn read_until_with_timeout(&self, buffer: &mut Vec, t: u64) -> Result { timeout(std::time::Duration::from_secs(t), self.read_until(buffer)).await? } } -- cgit v1.2.3