From 9f70e7d7e6288b9ab0093c0aa7273e2dad39daf4 Mon Sep 17 00:00:00 2001 From: GroovieGermanikus Date: Thu, 13 Jun 2024 09:44:16 +0200 Subject: [PATCH] fix example with error channel --- examples/stream_blocks_mainnet_task.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/stream_blocks_mainnet_task.rs b/examples/stream_blocks_mainnet_task.rs index a795e74..ce8d97e 100644 --- a/examples/stream_blocks_mainnet_task.rs +++ b/examples/stream_blocks_mainnet_task.rs @@ -118,7 +118,7 @@ pub async fn main() { subscribe_timeout: Duration::from_secs(5), receive_timeout: Duration::from_secs(5), }; - let (_, exit_notify) = tokio::sync::broadcast::channel(1); + let (exit_send, exit_notify) = tokio::sync::broadcast::channel(1); let green_config = GrpcSourceConfig::new(grpc_addr_green, grpc_x_token_green, None, timeouts.clone()); @@ -144,7 +144,7 @@ pub async fn main() { toxiproxy_config.clone(), GeyserFilter(CommitmentConfig::confirmed()).blocks_meta(), autoconnect_tx.clone(), - exit_notify, + exit_notify.resubscribe(), ); start_example_blockmeta_consumer(blockmeta_rx);