commit
0b97b27a23
|
@ -444,6 +444,7 @@ func (j *Job) Discard() error {
|
||||||
j.pw.Close()
|
j.pw.Close()
|
||||||
|
|
||||||
for k, st := range j.list.actives {
|
for k, st := range j.list.actives {
|
||||||
|
st.mu.Lock()
|
||||||
if _, ok := st.jobs[j]; ok {
|
if _, ok := st.jobs[j]; ok {
|
||||||
delete(st.jobs, j)
|
delete(st.jobs, j)
|
||||||
j.list.deleteIfUnreferenced(k, st)
|
j.list.deleteIfUnreferenced(k, st)
|
||||||
|
@ -451,6 +452,7 @@ func (j *Job) Discard() error {
|
||||||
if _, ok := st.allPw[j.pw]; ok {
|
if _, ok := st.allPw[j.pw]; ok {
|
||||||
delete(st.allPw, j.pw)
|
delete(st.allPw, j.pw)
|
||||||
}
|
}
|
||||||
|
st.mu.Unlock()
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue