diff --git a/core/services/workflows/engine.go b/core/services/workflows/engine.go index 71d9ab9463e..4694ca4286f 100644 --- a/core/services/workflows/engine.go +++ b/core/services/workflows/engine.go @@ -219,7 +219,12 @@ func (e *Engine) loop(ctx context.Context) { case <-ctx.Done(): e.logger.Debugw("shutting down loop") return - case resp := <-e.triggerEvents: + case resp, isOpen := <-e.triggerEvents: + if !isOpen { + e.logger.Errorf("trigger events channel is no longer open, skipping") + continue + } + if resp.Err != nil { e.logger.Errorf("trigger event was an error; not executing", resp.Err) continue