Skip to content

Commit

Permalink
Throw on stop in case of unsuccesfull shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
DeLaGuardo committed Dec 10, 2021
1 parent 60720a7 commit ebb6963
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/puppetlabs/trapperkeeper/internal.clj
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,12 @@
(inc-restart-counter! this)
this)
(a/stop [this]
(shutdown! app-context)
this)
(if-let [errors (not-empty (shutdown! app-context))]
(let [msg (i18n/trs "Error during app shutdown!")
e (ex-info msg {:errors errors})]
(log/error e msg)
(throw e))
this))
(a/restart [this]
(try
(run-lifecycle-fns app-context s/stop "stop" (reverse ordered-services))
Expand Down

0 comments on commit ebb6963

Please sign in to comment.