Merge pull request #3222 from chakflying/fix/mysql-aborted-connection

Fix: Try to close mysql connection properly
pull/612/merge
Louis Lam 1 year ago committed by GitHub
commit 37031fb9a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -342,7 +342,12 @@ exports.mysqlQuery = function (connectionString, query) {
resolve("No Error, but the result is not an array. Type: " + typeof res); resolve("No Error, but the result is not an array. Type: " + typeof res);
} }
} }
connection.destroy();
try {
connection.end();
} catch (_) {
connection.destroy();
}
}); });
}); });
}; };

Loading…
Cancel
Save