diff --git a/CHANGELOG.md b/CHANGELOG.md index 00b58d63..a243e490 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 0.19.4 +- increase timeout to 300 seconds + # 0.19.3 - correct exposure of types from dependency - bitcoinsv v0.2.4 diff --git a/Cargo.lock b/Cargo.lock index 74940646..0fc9643d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -91,7 +91,7 @@ dependencies = [ [[package]] name = "bitcoinsv-rpc" -version = "0.19.3" +version = "0.19.4" dependencies = [ "async-trait", "bitcoinsv", @@ -106,7 +106,7 @@ dependencies = [ [[package]] name = "bitcoinsv-rpc-json" -version = "0.19.3" +version = "0.19.4" dependencies = [ "approx", "bitcoinsv", diff --git a/client/Cargo.toml b/client/Cargo.toml index 3c323a98..3238928c 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bitcoinsv-rpc" -version = "0.19.3" +version = "0.19.4" authors = [ "Daniel Connolly " ] diff --git a/client/src/client.rs b/client/src/client.rs index 7decd880..b6394f8a 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -19,6 +19,8 @@ use bitcoinsv_rpc_json::GetNetworkInfoResult; use crate::error::*; use crate::json; +const DEFAULT_TIMEOUT_SECONDS: u64 = 300; + /// Crate-specific Result type, shorthand for `std::result::Result` with our /// crate-specific Error type; pub type Result = result::Result; @@ -511,6 +513,7 @@ impl Client { /// Can only return [Err] when using cookie authentication. pub fn new(url: &str, auth: Auth) -> Result { let b = jsonrpc::minreq_http::MinreqHttpTransport::builder() + .timeout(std::time::Duration::from_secs(DEFAULT_TIMEOUT_SECONDS)) .url(url)?; let b = match auth { Auth::None => b, diff --git a/json/Cargo.toml b/json/Cargo.toml index ecf77ee4..7f43f39d 100644 --- a/json/Cargo.toml +++ b/json/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bitcoinsv-rpc-json" -version = "0.19.3" +version = "0.19.4" authors = [ "Daniel Connolly ", ]