node-mysql2 icon indicating copy to clipboard operation
node-mysql2 copied to clipboard

behavior of connection.end() on closed connection differs from mysqljs/mysql.

Open Andrew-Opplaud opened this issue 3 years ago • 0 comments

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.

Andrew-Opplaud avatar Sep 22 '22 01:09 Andrew-Opplaud