Merge pull request #389 from github/close-sync-with-err

fixing binlog syncer double-close()
This commit is contained in:
Shlomi Noach 2017-03-29 09:00:25 +03:00 committed by GitHub
commit 1b0791e5dd

View File

@ -160,6 +160,10 @@ func (this *GoMySQLReader) StreamEvents(canStopStreaming func() bool, entriesCha
}
func (this *GoMySQLReader) Close() error {
this.binlogSyncer.Close()
// Historically there was a:
// this.binlogSyncer.Close()
// here. A new go-mysql version closes the binlog syncer connection independently.
// I will go against the sacred rules of comments and just leave this here.
// This is the year 2017. Let's see what year these comments get deleted.
return nil
}