fix stream message attempt counter

This commit is contained in:
GroovieGermanikus 2024-03-11 17:56:16 +01:00
parent 37ed49c210
commit 813931f210
No known key found for this signature in database
GPG Key ID: 5B6EB831A5CD2015
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ pub fn create_geyser_reconnecting_stream(
}
});
(ConnectionState::Connecting(attempt + 1, connection_task), Message::Connecting(attempt + 1))
(ConnectionState::Connecting(attempt + 1, connection_task), Message::Connecting(attempt))
}
ConnectionState::Connecting(attempt, connection_task) => {
@ -77,7 +77,7 @@ pub fn create_geyser_reconnecting_stream(
Ok(Err(geyser_error)) => {
// ATM we consider all errors recoverable
warn!("subscribe failed on {} - retrying: {:?}", grpc_source, geyser_error);
(ConnectionState::WaitReconnect(attempt + 1), Message::Connecting(attempt + 1))
(ConnectionState::WaitReconnect(attempt + 1), Message::Connecting(attempt))
},
Err(geyser_grpc_task_error) => {
panic!("task aborted - should not happen :{geyser_grpc_task_error}");