sectorstorage: Cleanup callToWork mapping after work is done

This commit is contained in:
Łukasz Magiera 2020-09-28 13:34:45 +02:00
parent aa7090df49
commit 9e7d6823b1

View File

@ -232,6 +232,11 @@ func (m *Manager) waitWork(ctx context.Context, wid WorkID) (interface{}, error)
res := m.results[wid] res := m.results[wid]
delete(m.results, wid) delete(m.results, wid)
_, ok := m.callToWork[ws.WorkerCall]
if ok {
delete(m.callToWork, ws.WorkerCall)
}
err := m.work.Get(wk).End() err := m.work.Get(wk).End()
if err != nil { if err != nil {
// Not great, but not worth discarding potentially multi-hour computation over this // Not great, but not worth discarding potentially multi-hour computation over this