Merge branch 'master' into develop

This commit is contained in:
Barış Soner Uşaklı
2025-02-03 18:17:09 -05:00
3 changed files with 14 additions and 9 deletions

View File

@@ -108,10 +108,10 @@
"nodebb-plugin-spam-be-gone": "2.3.0",
"nodebb-plugin-web-push": "0.7.2",
"nodebb-rewards-essentials": "1.0.0",
"nodebb-theme-harmony": "2.0.9",
"nodebb-theme-harmony": "2.0.10",
"nodebb-theme-lavender": "7.1.17",
"nodebb-theme-peace": "2.2.37",
"nodebb-theme-persona": "14.0.9",
"nodebb-theme-peace": "2.2.38",
"nodebb-theme-persona": "14.0.10",
"nodebb-widget-essentials": "7.0.32",
"nodemailer": "6.10.0",
"nprogress": "0.2.0",

View File

@@ -147,6 +147,6 @@ async function shutdown(code) {
} catch (err) {
winston.error(err.stack);
return process.exit(code || 0);
process.exit(code || 0);
}
}

View File

@@ -69,11 +69,16 @@ server.on('connection', (conn) => {
});
});
exports.destroy = function (callback) {
server.close(callback);
for (const connection of Object.values(connections)) {
connection.destroy();
}
exports.destroy = function () {
return new Promise((resolve, reject) => {
server.close((err) => {
if (err) reject(err);
else resolve();
});
for (const connection of Object.values(connections)) {
connection.destroy();
}
});
};
exports.getConnectionCount = function () {