File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -128,10 +128,7 @@ pub enum Error {
128128 #[ error( "WebSocket connection failed after {0} attempts" ) ]
129129 WebSocketConnectionFailed ( usize ) ,
130130
131- #[ error( "End of block batch" ) ]
132- Eof ,
133-
134- #[ error( "Reorg detected" ) ]
131+ #[ error( "Reorg Detected" ) ]
135132 ReorgDetected ,
136133}
137134
@@ -447,7 +444,9 @@ impl<N: Network> Service<N> {
447444
448445 self . sync_historical_data ( start_block, end_block) . await ?;
449446
450- info ! ( "Successfully synced historical data" ) ;
447+ _ = self . subscriber . take ( ) ;
448+
449+ info ! ( "Successfully synced historical data, closing the stream" ) ;
451450
452451 Ok ( ( ) )
453452 }
@@ -555,12 +554,6 @@ impl<N: Network> Service<N> {
555554
556555 info ! ( batch_count = batch_count, "Historical sync completed" ) ;
557556
558- if let Some ( sender) = & self . subscriber &&
559- sender. send ( Err ( Error :: Eof ) ) . await . is_err ( )
560- {
561- warn ! ( "Subscriber channel closed, cleaning up" ) ;
562- }
563-
564557 Ok ( ( ) )
565558 }
566559
You can’t perform that action at this time.
0 commit comments