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

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

Merged
merged 1 commit into from Apr 2, 2016

Conversation

wubzz
Copy link
Member

@wubzz 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
Copy link
Member Author

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 knex:master Apr 2, 2016
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.

None yet

1 participant