Skip to content

Commit

Permalink
bugfix: fixed timeout in wasm stabilazation (#495)
Browse files Browse the repository at this point in the history
* fixed timeout

* bump version to 0.3.5
  • Loading branch information
RyanKung authored Nov 16, 2023
1 parent b2cccca commit 9b2729b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resolver = "2"
members = ["core", "transport", "node", "rpc", "derive"]

[workspace.package]
version = "0.3.4"
version = "0.3.5"
edition = "2021"
license = "GPL-3.0"
authors = ["RND <[email protected]>"]
Expand Down
3 changes: 2 additions & 1 deletion core/src/dht/stabilization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ mod stabilizer {
impl TStabilize for Stabilization {
async fn wait(self: Arc<Self>) {
let caller = Arc::clone(&self);
let timeout = caller.timeout;
let func = move || {
let caller = caller.clone();
spawn_local(Box::pin(async move {
Expand All @@ -243,7 +244,7 @@ mod stabilizer {
.unwrap_or_else(|e| tracing::error!("failed to stabilize {:?}", e));
}))
};
poll!(func, 25000);
poll!(func, (timeout / 1000).try_into().unwrap());
}
}
}
Expand Down

0 comments on commit 9b2729b

Please sign in to comment.