From cfb2c7d833d92ef61e16f243169d7daf394225ac Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Thu, 9 Jan 2025 04:12:21 +0200 Subject: [PATCH] Handle plotter request timeouts quietly the same was as no responders --- crates/subspace-farmer/src/cluster/plotter.rs | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/crates/subspace-farmer/src/cluster/plotter.rs b/crates/subspace-farmer/src/cluster/plotter.rs index cc11200e15..b1cfab45fb 100644 --- a/crates/subspace-farmer/src/cluster/plotter.rs +++ b/crates/subspace-farmer/src/cluster/plotter.rs @@ -496,6 +496,24 @@ where } } Err(error) => match error.kind() { + RequestErrorKind::TimedOut => { + if let Some(delay) = retry_backoff_policy.next_backoff() { + debug!("Plotter request timed out, retrying"); + + tokio::time::sleep(delay).await; + continue; + } else { + progress_updater + .update_progress_and_events( + progress_sender, + SectorPlottingProgress::Error { + error: "Plotter request timed out, exiting".to_string(), + }, + ) + .await; + return None; + } + } RequestErrorKind::NoResponders => { if let Some(delay) = retry_backoff_policy.next_backoff() { debug!("No plotters, retrying"); @@ -514,7 +532,7 @@ where return None; } } - RequestErrorKind::TimedOut | RequestErrorKind::Other => { + RequestErrorKind::Other => { progress_updater .update_progress_and_events( progress_sender,