зеркало из https://github.com/github/vitess-gh.git
tabletmanager: Fixed missing mutex unlock in BinlogPlayerController.Close().
This commit is contained in:
Родитель
7405126abb
Коммит
6f9d6f1780
|
@ -211,8 +211,9 @@ func (bpc *BinlogPlayerController) Stop() {
|
|||
// called but not Stop().)
|
||||
func (bpc *BinlogPlayerController) Close() error {
|
||||
bpc.playerMutex.Lock()
|
||||
defer bpc.playerMutex.Unlock()
|
||||
|
||||
if bpc.ctx != nil {
|
||||
bpc.playerMutex.Unlock()
|
||||
return fmt.Errorf("%v: cannot Close() a BinlogPlayerController which was not Stop()'d before", bpc)
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче