Skip to content

Commit

Permalink
Avoid panicking and reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
godmodegalactus committed Jan 17, 2024
1 parent 4b78113 commit a3e8e89
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/grpc_subscription_autoreconnect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand All @@ -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))
}
}

Expand Down

0 comments on commit a3e8e89

Please sign in to comment.