From 6c5e374408ac8e10e7fd10baf1ca9d06da0e24e5 Mon Sep 17 00:00:00 2001 From: Revertron Date: Sat, 24 Apr 2021 23:32:08 +0200 Subject: [PATCH] Fixes for previous release. --- Cargo.toml | 2 +- src/commons/constants.rs | 2 +- src/miner.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3a291cf..72309b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "alfis" -version = "0.4.27" +version = "0.4.28" authors = ["Revertron "] edition = "2018" build = "build.rs" diff --git a/src/commons/constants.rs b/src/commons/constants.rs index 273b1dc..ab7ca42 100644 --- a/src/commons/constants.rs +++ b/src/commons/constants.rs @@ -43,5 +43,5 @@ pub const LOG_REFRESH_DELAY_SEC: u64 = 60; pub const POLL_TIMEOUT: Option = Some(Duration::from_millis(250)); pub const MAX_PACKET_SIZE: usize = 1 * 1024 * 1024; // 1 Mb -pub const MAX_READ_BLOCK_TIME: u128 = 200; +pub const MAX_READ_BLOCK_TIME: u128 = 500; pub const MAX_NODES: usize = 15; diff --git a/src/miner.rs b/src/miner.rs index 18e9331..ff74deb 100644 --- a/src/miner.rs +++ b/src/miner.rs @@ -158,6 +158,7 @@ impl Miner { } } } + let _ = cond_var.wait_timeout(jobs, delay).expect("Error in wait lock!"); } } else { let mut jobs = jobs.lock().unwrap();