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

Mysql2 should also listen to 'error' events. #1315

Merged
merged 1 commit into from Apr 2, 2016

Conversation

Projects
None yet
1 participant
@wubzz
Collaborator

wubzz commented Mar 29, 2016

Briefly noticed in #1198 there's a diff between how mysql and mysql2 handle events, yet they're both almost identical. I can't find an end event in mysql2, but the error is there (with the appropiate "fatal" flag) so unless I'm missing something it should be listened to here as well.

https://github.com/sidorares/node-mysql2/blob/master/lib/connection.js#L96

@elhigu @rhys-vdw Does this make sense to you?

@wubzz

This comment has been minimized.

Collaborator

wubzz commented Apr 2, 2016

I've debugged this further and it is in fact the case. Connections aren't being disposed using the "MySQL Specific handler" when specified driver is mysql2. This fixes that problem.

@wubzz wubzz merged commit a104cc0 into tgriesser:master Apr 2, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment