Skip to content

Commit

Permalink
Reset restart count on any kind of manual start
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexagon committed Apr 22, 2024
1 parent 04cd07f commit 2293847
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this section.

- fix(rest): Add `/log` to the rest api
- chore(docs): Add Rest API docs.
- fix(core): Reset restart count on any kind of manual start

## [1.0.0-rc.29] - 2024-04-22

Expand Down
4 changes: 2 additions & 2 deletions lib/core/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ class Process {
return
}

// Do not restart if maximum number of restarts are exhausted
if (this.restarts >= (this.config.restartLimit ?? Infinity)) {
// Do not restart if maximum number of restarts are exhausted and reason is restart
if (this.restarts >= (this.config.restartLimit ?? Infinity) && restart) {
logger.log("exhausted", `Maximum number of starts exhausted, refusing to start`, this.config)
this.setStatus(ProcessState.EXHAUSTED)
return
Expand Down

0 comments on commit 2293847

Please sign in to comment.