Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
fix: skip self-query if not running (#479)
Browse files Browse the repository at this point in the history
Make an additional check before setting the timeout to run the
self-query later as sometimes the node is shut down before this
happens.
  • Loading branch information
achingbrain authored Jun 1, 2023
1 parent c57f6d7 commit 7095290
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/query-self.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ export class QuerySelf implements Startable {
this.querySelfPromise.resolve()
this.querySelfPromise = undefined

if (!this.started) {
return
}

this.timeoutId = setTimeout(() => {
this.querySelf()
.catch(err => {
Expand Down

0 comments on commit 7095290

Please sign in to comment.