Skip to content

Fix panic when failed to SetKeepAlive(). #298

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

Merged

Conversation

methane
Copy link
Member

@methane methane commented Jan 2, 2015

When SetKeepAlive fails, panic occured because mc.Close() uses
unset mc.buf. Since this is before handshake, we should close
socket without sending COM_QUIT.

When SetKeepAlive fails, panic occured because mc.Close() uses
unset mc.buf.  Since this is before handshake, we should close
socket without sending COM_QUIT.
@julienschmidt
Copy link
Member

Thank you! Please add yourself to the AUTHORS file. Extra points, if you can also write a test, but I think this is optional in this case.

julienschmidt added a commit that referenced this pull request Jan 3, 2015
@julienschmidt julienschmidt merged commit 04cf947 into go-sql-driver:master Jan 3, 2015
@julienschmidt julienschmidt added this to the v1.3 milestone Jan 3, 2015
@julienschmidt julienschmidt self-assigned this Jan 3, 2015
@methane methane deleted the fix-panic-on-connect-fail branch August 2, 2016 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants