Skip to content
Snippets Groups Projects
Commit 35ec85f2 authored by ale's avatar ale
Browse files

Limit the rate of liquidsoap restarts

parent 24658d3e
Branches
No related tags found
No related merge requests found
......@@ -89,6 +89,9 @@ func (t *transcoder) run(ctx context.Context) error {
cmd.Stderr = os.Stderr
err = cmd.Run()
if err != nil && err != context.Canceled {
// Sleeping here limits the rate of liquidsoap restart
// if we are crashlooping for whatever reason.
time.Sleep(1 * time.Second)
log.Printf("error: %s: liquidsoap failed: %v", t.mount.Path, err)
}
return err
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment