mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-18 02:47:24 +00:00
Fix: Try to close mysql connection properly
This commit is contained in:
parent
4b3a2ee71b
commit
58ec53fb1d
1 changed files with 6 additions and 1 deletions
|
@ -342,7 +342,12 @@ exports.mysqlQuery = function (connectionString, query) {
|
|||
resolve("No Error, but the result is not an array. Type: " + typeof res);
|
||||
}
|
||||
}
|
||||
connection.destroy();
|
||||
|
||||
try {
|
||||
connection.end();
|
||||
} catch (_) {
|
||||
connection.destroy();
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue