1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-12-14 10:23:16 +02:00

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();
}
});
});
};