Adding timeout of 30s to resubscribe to blocks
This commit is contained in:
parent
a862c18da5
commit
62cdda36d0
|
@ -191,7 +191,9 @@ async fn start_tracking_blocks(
|
|||
)
|
||||
.await
|
||||
.unwrap();
|
||||
while let Some(message) = geyser_stream.next().await {
|
||||
while let Ok(Some(message)) =
|
||||
tokio::time::timeout(Duration::from_secs(30), geyser_stream.next()).await
|
||||
{
|
||||
let Ok(message) = message else {
|
||||
continue;
|
||||
};
|
||||
|
|
|
@ -735,9 +735,10 @@ impl Postgres {
|
|||
for batch in batches {
|
||||
if let Err(err) = session
|
||||
.save_banking_transaction_results(batch.to_vec())
|
||||
.await {
|
||||
panic!("saving transaction infos failed {}", err);
|
||||
}
|
||||
.await
|
||||
{
|
||||
panic!("saving transaction infos failed {}", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue