Simplify
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Alex 2022-06-07 17:10:22 +02:00
parent a3a01141ec
commit 1d408d52b9
Signed by: lx
GPG key ID: 0E496D15096376BE

View file

@ -335,7 +335,6 @@ impl BlockManager {
// we will fecth it from someone. // we will fecth it from someone.
let this = self.clone(); let this = self.clone();
tokio::spawn(async move { tokio::spawn(async move {
tokio::time::sleep(Duration::from_secs(1)).await;
if let Err(e) = this.put_to_resync(&hash, 2 * BLOCK_RW_TIMEOUT) { if let Err(e) = this.put_to_resync(&hash, 2 * BLOCK_RW_TIMEOUT) {
error!("Block {:?} could not be put in resync queue: {}.", hash, e); error!("Block {:?} could not be put in resync queue: {}.", hash, e);
} }
@ -354,7 +353,6 @@ impl BlockManager {
// after that delay has passed. // after that delay has passed.
let this = self.clone(); let this = self.clone();
tokio::spawn(async move { tokio::spawn(async move {
tokio::time::sleep(Duration::from_secs(1)).await;
if let Err(e) = this.put_to_resync(&hash, BLOCK_GC_DELAY + Duration::from_secs(10)) if let Err(e) = this.put_to_resync(&hash, BLOCK_GC_DELAY + Duration::from_secs(10))
{ {
error!("Block {:?} could not be put in resync queue: {}.", hash, e); error!("Block {:?} could not be put in resync queue: {}.", hash, e);