From c4114023183d2ea8af3f45c4874bb2080a36a9e7 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 21 Jun 2023 22:04:48 +0200 Subject: [PATCH] Retry activity send on connection failure (fixes #41) --- src/activity_queue.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/activity_queue.rs b/src/activity_queue.rs index f470ed9..c6c5864 100644 --- a/src/activity_queue.rs +++ b/src/activity_queue.rs @@ -217,13 +217,12 @@ async fn send( text, )) } - Err(e) => { - debug!( - "Unable to connect to {}, aborting task {}: {}", - task.inbox, task.activity_id, e - ); - Ok(()) - } + Err(e) => Err(anyhow!( + "Queueing activity {} to {} for retry after connection failure: {}", + task.activity_id, + task.inbox, + e + )), } }