File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -127,9 +127,6 @@ pub enum Error {
127127
128128 #[ error( "WebSocket connection failed after {0} attempts" ) ]
129129 WebSocketConnectionFailed ( usize ) ,
130-
131- #[ error( "End of block batch" ) ]
132- Eof ,
133130}
134131
135132#[ derive( Debug ) ]
@@ -443,7 +440,9 @@ impl<N: Network> Service<N> {
443440
444441 self . sync_historical_data ( start_block, end_block) . await ?;
445442
446- info ! ( "Successfully synced historical data" ) ;
443+ _ = self . subscriber . take ( ) ;
444+
445+ info ! ( "Successfully synced historical data, closing the stream" ) ;
447446
448447 Ok ( ( ) )
449448 }
@@ -548,12 +547,6 @@ impl<N: Network> Service<N> {
548547
549548 info ! ( batch_count = batch_count, "Historical sync completed" ) ;
550549
551- if let Some ( sender) = & self . subscriber &&
552- sender. send ( Err ( Error :: Eof ) ) . await . is_err ( )
553- {
554- warn ! ( "Subscriber channel closed, cleaning up" ) ;
555- }
556-
557550 Ok ( ( ) )
558551 }
559552
You can’t perform that action at this time.
0 commit comments