node-mysql2
node-mysql2 copied to clipboard
behavior of connection.end() on closed connection differs from mysqljs/mysql.
In mysqljs/mysql, calling:
connection.end();
connection.end( err => { if ( err ) console.info( err.message ); } );
results in:
Cannot enqueue Quit after invoking quit
In mysql2, the second call to end() doesn't invokes the callback.
After dropping in mysql2 to replace mysql, this was detected by a unit test expecting a call to end() on a closed connection to result in an error.