Skip to content

Commit

Permalink
log ping messages
Browse files Browse the repository at this point in the history
  • Loading branch information
grooviegermanikus committed Jan 3, 2024
1 parent 4d7e781 commit fe267b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/grpc_subscription_autoreconnect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use std::time::Duration;
use tokio::task::JoinHandle;
use tokio::time::{sleep, timeout};
use yellowstone_grpc_client::{GeyserGrpcClient, GeyserGrpcClientResult};
use yellowstone_grpc_proto::geyser::subscribe_update::UpdateOneof;
use yellowstone_grpc_proto::geyser::{
CommitmentLevel, SubscribeRequest, SubscribeRequestFilterBlocks, SubscribeUpdate,
};
Expand Down Expand Up @@ -224,7 +225,11 @@ pub fn create_geyser_reconnecting_stream(

match geyser_stream.next().await {
Some(Ok(update_message)) => {
trace!("> recv update message from {}", grpc_source);
if let Some(UpdateOneof::Ping(_)) = &update_message.update_oneof {
trace!("> recv ping message from {}", grpc_source);
} else {
trace!("> recv update message from {}", grpc_source);
}
(ConnectionState::Ready(attempt, geyser_stream), Message::GeyserSubscribeUpdate(Box::new(update_message)))
}
Some(Err(tonic_status)) => {
Expand Down

0 comments on commit fe267b6

Please sign in to comment.