Skip to content

Commit

Permalink
Merge pull request #22 from xiaomakuaiz/fix-result
Browse files Browse the repository at this point in the history
fix: result race issue
  • Loading branch information
phxa1 authored Jun 3, 2024
2 parents 19efb29 + 65599fb commit f21cd42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,9 @@ func (w *Worker) processJobResult() {
w.result.Error++
}
if w.resultCh != nil {
w.result.Job = job
w.resultCh <- w.result
r := *w.result
r.Job = job
w.resultCh <- &r
}
}
}
Expand Down

0 comments on commit f21cd42

Please sign in to comment.