handle corner case

This commit is contained in:
mudler
2024-04-20 10:35:57 +02:00
parent 22160cbf9e
commit bc7192d664

View File

@@ -243,8 +243,10 @@ func (a *Agent) consumeJob(job *Job, role string) {
defer func() {
a.Lock()
a.actionContext.Cancel()
a.actionContext = nil
if a.actionContext != nil {
a.actionContext.Cancel()
a.actionContext = nil
}
a.Unlock()
}()