From 449d49b000427c49c497bca1b0f5785ec92e5952 Mon Sep 17 00:00:00 2001 From: zeroXbrock <2791467+zeroXbrock@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:33:45 -0800 Subject: [PATCH] don't crash on failed task --- crates/core/src/spammer/spammer_trait.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/core/src/spammer/spammer_trait.rs b/crates/core/src/spammer/spammer_trait.rs index e134055..8ac4519 100644 --- a/crates/core/src/spammer/spammer_trait.rs +++ b/crates/core/src/spammer/spammer_trait.rs @@ -63,8 +63,10 @@ where .execute_spam(trigger, &payloads, sent_tx_callback.clone()) .await?; for task in spam_tasks { - task.await - .map_err(|e| ContenderError::with_err(e, "spam task failed"))?; + let res = task.await; + if let Err(e) = res { + eprintln!("spam task failed: {:?}", e); + } } tick += 1; }