handle connect problems
This commit is contained in:
parent
def0853c0f
commit
ca55a8bba8
|
@ -355,35 +355,31 @@ pub fn create_geyser_reconnecting_task(
|
||||||
client.subscribe_once2(subscribe_filter))
|
client.subscribe_once2(subscribe_filter))
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
let subscribe_result;
|
match subscribe_result_timeout {
|
||||||
match subscribe_result_timeout.map_err(|_| Status::unknown("unspecific subscribe timeout")) {
|
Ok(subscribe_result) => {
|
||||||
Ok(fooo) => {
|
match subscribe_result {
|
||||||
subscribe_result = fooo;
|
Ok(geyser_stream) => {
|
||||||
|
Ready(attempt, geyser_stream)
|
||||||
|
}
|
||||||
|
Err(GeyserGrpcClientError::TonicError(_)) => {
|
||||||
|
warn!("! subscribe failed on {} - retrying", grpc_source);
|
||||||
|
RecoverableConnectionError(attempt)
|
||||||
|
}
|
||||||
|
Err(GeyserGrpcClientError::TonicStatus(_)) => {
|
||||||
|
warn!("! subscribe failed on {} - retrying", grpc_source);
|
||||||
|
RecoverableConnectionError(attempt)
|
||||||
|
}
|
||||||
|
// non-recoverable
|
||||||
|
Err(unrecoverable_error) => {
|
||||||
|
error!("! subscribe to {} failed with unrecoverable error: {}", grpc_source, unrecoverable_error);
|
||||||
|
FatalError(attempt)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Err(_elapsed) => {
|
Err(_elapsed) => {
|
||||||
todo!()
|
warn!("! subscribe failed with timeout on {} - retrying", grpc_source);
|
||||||
}
|
|
||||||
}
|
|
||||||
// maybe not optimal
|
|
||||||
// let subscribe_result = subscribe_result_timeout.map_err(|_| Status::unknown("unspecific subscribe timeout"));
|
|
||||||
|
|
||||||
match subscribe_result {
|
|
||||||
Ok(geyser_stream) => {
|
|
||||||
Ready(attempt, geyser_stream)
|
|
||||||
}
|
|
||||||
Err(GeyserGrpcClientError::TonicError(_)) => {
|
|
||||||
warn!("! subscribe failed on {} - retrying", grpc_source);
|
|
||||||
RecoverableConnectionError(attempt)
|
RecoverableConnectionError(attempt)
|
||||||
}
|
}
|
||||||
Err(GeyserGrpcClientError::TonicStatus(_)) => {
|
|
||||||
warn!("! subscribe failed on {} - retrying", grpc_source);
|
|
||||||
RecoverableConnectionError(attempt)
|
|
||||||
}
|
|
||||||
// non-recoverable
|
|
||||||
Err(unrecoverable_error) => {
|
|
||||||
error!("! subscribe to {} failed with unrecoverable error: {}", grpc_source, unrecoverable_error);
|
|
||||||
FatalError(attempt)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RecoverableConnectionError(attempt) => {
|
RecoverableConnectionError(attempt) => {
|
||||||
|
|
Loading…
Reference in New Issue