File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
apps/price_pusher/src/solana Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,14 @@ export class SolanaPriceListener extends ChainPriceListener {
3535 const blockTime = await this . pythSolanaReceiver . connection . getBlockTime (
3636 slot
3737 ) ;
38- if ( blockTime !== undefined || blockTime < Date . now ( ) / 1000 - 30 ) {
38+ if ( blockTime === null || blockTime < Date . now ( ) / 1000 - 30 ) {
3939 throw new Error ( "Solana connection is unhealthy" ) ;
4040 }
4141 }
4242
4343 async start ( ) {
4444 // Frequently check the RPC connection to ensure it is healthy
45- setInterval ( ( ) => this . checkHealth . bind ( this ) , 5000 ) ;
45+ setInterval ( this . checkHealth . bind ( this ) , 5000 ) ;
4646
4747 await super . start ( ) ;
4848 }
@@ -125,6 +125,7 @@ export class SolanaPricePusher implements IPricePusher {
125125 this . logger . info ( { signatures } , "updatePriceFeed successful" ) ;
126126 } catch ( err : any ) {
127127 this . logger . error ( err , "updatePriceFeed failed" ) ;
128+ return ;
128129 }
129130 }
130131}
You can’t perform that action at this time.
0 commit comments