mirror of
https://github.com/serai-dex/serai.git
synced 2025-02-02 03:06:31 +00:00
Add a sleep statement to Batch publication errors to prevent log flooding/node hammering
This commit is contained in:
parent
f847ac7077
commit
f25f5cd368
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue