Skip to content

Commit 7a3912d

Browse files
author
Shlomi Noach
committed
fixing binlog syncer double-close()
1 parent f3fb0ea commit 7a3912d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

go/binlog/gomysql_reader.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ func (this *GoMySQLReader) StreamEvents(canStopStreaming func() bool, entriesCha
160160
}
161161

162162
func (this *GoMySQLReader) Close() error {
163-
this.binlogSyncer.Close()
163+
// Historically there was a:
164+
// this.binlogSyncer.Close()
165+
// here. A new go-mysql version closes the binlog syncer connection independently.
166+
// I will go against the sacred rules of comments and just leave this here.
167+
// This is the year 2017. Let's see what year these comments get deleted.
164168
return nil
165169
}

0 commit comments

Comments
 (0)