Skip to content

Commit

Permalink
observe host default rpc timeout in all cases (#99)
Browse files Browse the repository at this point in the history
bump wasmbus-rpc to 0.8.5

Signed-off-by: stevelr <[email protected]>
  • Loading branch information
stevelr authored May 11, 2022
1 parent a9afe76 commit 4756d3e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions rpc-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasmbus-rpc"
version = "0.8.4"
version = "0.8.5"
authors = [ "wasmcloud Team" ]
license = "Apache-2.0"
description = "Runtime library for actors and capability providers"
Expand Down Expand Up @@ -34,7 +34,7 @@ thiserror = "1.0"
time = "0.3.7"
tokio-timer = "0.2"
toml = "0.5"
tracing = { version = "0.1", features = ["log"] }
tracing = { version = "0.1.34", features = ["log"] }
tracing-futures = "0.2"
wasmbus-macros = { path = "../macros", version = "0.1.8" }
minicbor-ser = "0.1.2"
Expand Down
19 changes: 11 additions & 8 deletions rpc-rs/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ impl HostBridge {
&host_data.lattice_rpc_prefix,
key,
host_data.host_id.clone(),
None,
host_data
.default_rpc_timeout_ms
.map(|ms| Duration::from_millis(ms as u64)),
);

Ok(HostBridge {
Expand Down Expand Up @@ -832,16 +834,17 @@ impl<'send> ProviderTransport<'send> {
) -> Self {
#[allow(clippy::redundant_closure)]
let bridge = bridge.unwrap_or_else(|| crate::provider_main::get_host_bridge());
let timeout = StdMutex::new(timeout.unwrap_or_else(|| {
bridge
.host_data
.default_rpc_timeout_ms
.map(|t| Duration::from_millis(t as u64))
.unwrap_or(DEFAULT_RPC_TIMEOUT_MILLIS)
}));
Self {
bridge,
ld,
timeout: StdMutex::new(timeout.unwrap_or_else(|| {
bridge
.host_data
.default_rpc_timeout_ms
.map(|t| Duration::from_millis(t as u64))
.unwrap_or(DEFAULT_RPC_TIMEOUT_MILLIS)
})),
timeout,
}
}
}
Expand Down

0 comments on commit 4756d3e

Please sign in to comment.