mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-20 21:24:44 -05:00
Fix mssqlQuery keep adding error listener, which causes memory leak.
Also it is not necessary since the error catched in the promise .catch(..).
This commit is contained in:
parent
2073f0c284
commit
65d71e5db0
@ -238,10 +238,6 @@ exports.dnsResolve = function (hostname, resolverServer, resolverPort, rrtype) {
|
||||
*/
|
||||
exports.mssqlQuery = function (connectionString, query) {
|
||||
return new Promise((resolve, reject) => {
|
||||
mssql.on("error", err => {
|
||||
reject(err);
|
||||
});
|
||||
|
||||
mssql.connect(connectionString).then(pool => {
|
||||
return pool.request()
|
||||
.query(query);
|
||||
|
Loading…
Reference in New Issue
Block a user