tabletmanager: Fixed missing mutex unlock in BinlogPlayerController.Close().

This commit is contained in:
Michael Berlin 2016-05-19 16:31:36 -07:00
Родитель 7405126abb
Коммит 6f9d6f1780
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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)
}