Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: Handle closed ticker in lifecycle executor
  • Loading branch information
mafredri committed Jul 27, 2022
commit 1e062bbd29cdb6313821690ac639b7303dc30611
5 changes: 4 additions & 1 deletion coderd/autobuild/executor/lifecycle_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ func (e *Executor) Run() {
select {
case <-e.ctx.Done():
return
case t := <-e.tick:
case t, ok := <-e.tick:
if !ok {
return
}
stats := e.runOnce(t)
if stats.Error != nil {
e.log.Error(e.ctx, "error running once", slog.Error(stats.Error))
Expand Down