Fix: Try to close mysql connection properly

pull/3222/head
Nelson Chan 2 years ago
parent 4b3a2ee71b
commit 58ec53fb1d

@ -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