mirror of
https://github.com/bluenviron/mediamtx
synced 2024-12-13 10:14:58 +00: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
@ -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…
Reference in New Issue
Block a user