fix(enterprise/replicasync): Avoid deadlock during Close^2 (#7230)

This commit is contained in:
Mathias Fredriksson 2023-04-20 22:48:44 +03:00 committed by GitHub
parent 34c6ad671c
commit 38a6d546ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -371,8 +371,8 @@ func (m *Manager) Close() error {
}
close(m.closed)
m.closeCancel()
m.closeWait.Wait()
m.closeMutex.Unlock()
m.closeWait.Wait()
m.mutex.Lock()
defer m.mutex.Unlock()
ctx, cancelFunc := context.WithTimeout(context.Background(), 5*time.Second)