Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix close canal client panic if use Execute after mysql host down #858

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

tomwei7
Copy link
Contributor

@tomwei7 tomwei7 commented Apr 22, 2024

Execute some query when mysql host is down or unavailable will set c.conn = nil and it case panic when close canal client.

go-mysql/canal/canal.go

Lines 521 to 526 in f0df38a

if mysql.ErrorEqual(err, mysql.ErrBadConn) {
c.conn.Close()
c.conn = nil
continue
}
return nil, err

@lance6716 lance6716 merged commit 7c31dc4 into go-mysql-org:master Apr 22, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants