Avoid panicking and reconnect

This commit is contained in:
godmodegalactus 2024-01-17 21:40:10 +01:00
parent 4b78113456
commit a3e8e89af7
No known key found for this signature in database
GPG Key ID: 22DA4A30887FDA3C
1 changed files with 4 additions and 2 deletions

View File

@ -214,7 +214,8 @@ pub fn create_geyser_reconnecting_stream(
(ConnectionState::WaitReconnect(attempt), Message::Connecting(attempt))
},
Err(geyser_grpc_task_error) => {
panic!("! task aborted - should not happen :{geyser_grpc_task_error}");
log::error!("! task aborted - should not happen :{geyser_grpc_task_error}");
(ConnectionState::WaitReconnect(attempt), Message::Connecting(attempt))
}
}
@ -234,7 +235,8 @@ pub fn create_geyser_reconnecting_stream(
}
None => {
// should not arrive here, Mean the stream close.
panic!("geyser stream closed on {} - retrying", grpc_source);
log::error!("! ready stream closed");
(ConnectionState::WaitReconnect(attempt), Message::Connecting(attempt))
}
}