Skip to content

Commit

Permalink
chore: add reconnect event listener
Browse files Browse the repository at this point in the history
  • Loading branch information
nvtaveras committed Jun 6, 2024
1 parent ea7586d commit 4bfba99
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/reporters/block_based_reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ export class BlockBasedReporter extends BaseReporter {
setupNewProvider = true
}

this.provider.on('reconnect', () => {
this.logger.info('Attempting to reconnect to WebsocketProvider...')
})

// @ts-ignore - the type definition does not include the error
this.provider.on('error', async (error: Error) => {
onError(error, {
Expand Down

0 comments on commit 4bfba99

Please sign in to comment.