mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-30 03:00:40 +00: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
1 changed files with 0 additions and 4 deletions
|
@ -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 a new issue