Merge pull request #1410 from alainjobart/replication

Properly freeing up the healthcheck resources in binlog player.
This commit is contained in:
Alain Jobart 2016-01-04 13:22:57 -08:00
Родитель e5d4f759a7 6c061ba9d2
Коммит 8c12844604
1 изменённых файлов: 2 добавлений и 0 удалений

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

@ -442,6 +442,7 @@ func (blm *BinlogPlayerMap) StopAllPlayersAndReset() {
if blm.state == BpmStateRunning {
bpc.Stop()
}
bpc.healthCheck.Close()
hadPlayers = true
}
blm.players = make(map[uint32]*BinlogPlayerController)
@ -482,6 +483,7 @@ func (blm *BinlogPlayerMap) RefreshMap(ctx context.Context, tablet *topodatapb.T
// remove all entries from toRemove
for source := range toRemove {
blm.players[source].Stop()
blm.players[source].healthCheck.Close()
delete(blm.players, source)
}