Skip to content

Commit

Permalink
Catch errors in initializeHost on handleActionsChange
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmischka committed May 24, 2023
1 parent 75ec7ac commit 04db092
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/classes/IntervalClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,13 @@ export default class IntervalClient {

if (this.#isInitialized && !this.#reinitializeTimeout) {
this.#reinitializeTimeout = setTimeout(async () => {
await this.#initializeHost()
this.#reinitializeTimeout = null
try {
await this.#initializeHost()
} catch (err) {
this.#logger.error('Failed to reinitialize on routes change', err)
} finally {
this.#reinitializeTimeout = null
}
}, this.#reinitializeBatchTimeoutMs)
}
}
Expand Down

0 comments on commit 04db092

Please sign in to comment.