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

Fix: Try to close mysql connection properly
This commit is contained in:
Louis Lam 2023-06-08 00:26:18 +08:00 committed by GitHub
commit 37031fb9a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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