diff --git a/extern/sector-storage/manager_calltracker.go b/extern/sector-storage/manager_calltracker.go index cba363778..8a1c1e4f9 100644 --- a/extern/sector-storage/manager_calltracker.go +++ b/extern/sector-storage/manager_calltracker.go @@ -271,6 +271,7 @@ func (m *Manager) waitWork(ctx context.Context, wid WorkID) (interface{}, error) res, ok := m.results[wid] if ok { done() + m.workLk.Unlock() return res.r, res.err } diff --git a/extern/sector-storage/manager_test.go b/extern/sector-storage/manager_test.go index 215e5dc90..0e3e7bc9d 100644 --- a/extern/sector-storage/manager_test.go +++ b/extern/sector-storage/manager_test.go @@ -296,6 +296,9 @@ func TestRestartManager(t *testing.T) { require.NoError(t, err) require.Equal(t, 1, tw.pc1s) + + ws := m.WorkerJobs() + require.Empty(t, ws) } }