Fix deadlock when error during metacache generation (#13201)

A typo forgot to release a lock after acquiring it.
This commit is contained in:
Anis Elleuch 2021-09-13 17:11:39 +01:00 committed by GitHub
parent 90e505e58f
commit 98479d7ffd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -599,7 +599,7 @@ type metaCacheRPC struct {
func (m *metaCacheRPC) setErr(err string) {
m.mu.Lock()
defer m.mu.Lock()
defer m.mu.Unlock()
meta := *m.meta
if meta.status != scanStateError {
meta.error = err