mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
test: Check if provisionerd is closed before setting run chan (#1145)
This race can be seen here: https://github.com/coder/coder/runs/6159662393?check_suite_focus=true
This commit is contained in:
@@ -230,6 +230,9 @@ func (p *Server) acquireJob(ctx context.Context) {
|
||||
if job.JobId == "" {
|
||||
return
|
||||
}
|
||||
if p.isClosed() {
|
||||
return
|
||||
}
|
||||
ctx, p.jobCancel = context.WithCancel(ctx)
|
||||
p.jobRunning = make(chan struct{})
|
||||
p.jobFailed.Store(false)
|
||||
|
||||
Reference in New Issue
Block a user