mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-25 04:22:00 -08:00
RunOn.. commands - Propagate errors in restart configurations (#2828)
* RunOnX commands - Propagate errors in restart configurations * apply gofmt --------- Co-authored-by: James Bohnert <jbohnert@haivision.com> Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
This commit is contained in:
parent
1feeba92b0
commit
3ecd79f076
1 changed files with 5 additions and 1 deletions
|
|
@ -87,7 +87,11 @@ func (e *Cmd) run() {
|
|||
return
|
||||
}
|
||||
|
||||
e.onExit(fmt.Errorf("command exited with code 0"))
|
||||
if err != nil {
|
||||
e.onExit(err)
|
||||
} else {
|
||||
e.onExit(fmt.Errorf("command exited with code 0"))
|
||||
}
|
||||
|
||||
select {
|
||||
case <-time.After(restartPause):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue