manjeshpv / node-express-passport-mysql

Login Express + Passport + MySQL
https://github.com/manjeshpv/awesome-sandbox
403 stars 211 forks source link

'PROTOCOL_ENQUEUE_AFTER_QUIT' #20

Open MaximeGer opened 4 years ago

MaximeGer commented 4 years ago

The problem is from the managing of connection.end() and connection.connect(). I deleted all these commands and it worked pretty well. I'm assuming the code needs a review so the connections at the database don't make problems anymore

nax3t commented 3 years ago

Removing all instances of connection.connect() and connection.end() solves the PROTOCOL_ENQUEUE_AFTER_QUIT error for me, but is it the correct way to handle mysql connection(s)?