mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-09-11 13:36:55 +08:00
Fix: Try to close mysql connection properly
This commit is contained in:
@@ -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();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user