mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Add a sleep statement to Batch publication errors to prevent log flooding/node hammering
This commit is contained in:
@@ -761,6 +761,8 @@ async fn handle_processor_messages<D: Db, Pro: Processors, P: P2p>(
|
||||
);
|
||||
// If we failed to publish it, restore it
|
||||
batches.push_front(batch);
|
||||
// Sleep for a few seconds before retrying to prevent hammering the node
|
||||
tokio::time::sleep(Duration::from_secs(5)).await;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user