Commit 35ec85f2 authored by ale's avatar ale

Limit the rate of liquidsoap restarts

parent 24658d3e
Pipeline #5949 passed with stages
in 4 minutes and 57 seconds
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment