From 7a3912da80d396e77e301b9a69e181b362269df2 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Mon, 27 Mar 2017 08:33:06 +0300 Subject: [PATCH] fixing binlog syncer double-close() --- go/binlog/gomysql_reader.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/go/binlog/gomysql_reader.go b/go/binlog/gomysql_reader.go index 445617a..9feca87 100644 --- a/go/binlog/gomysql_reader.go +++ b/go/binlog/gomysql_reader.go @@ -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 }