This commit is contained in:
Eason010212
2023-01-13 12:27:33 +08:00
parent 9dcb1f5e50
commit be042c4a60

View File

@@ -20,7 +20,7 @@ const path = require('path');
var VERSION = JSON.parse(fs.readFileSync("../version.json", "utf-8"))["version"]
var configs = fs.readFileSync('./config.json');
configs = JSON.parse(configs.toString());
const MAX_MESSAGE_PER_USER = 1000
var MAX_MESSAGE_PER_USER = configs["MAX_MESSAGE_COUNT"] ? configs["MAX_MESSAGE_COUNT"] : 1000
var minInterval = configs["MIN_PUBLISH_INTERVAL"] ? configs["MIN_PUBLISH_INTERVAL"] : 100
var serverStatus = true
@@ -224,6 +224,7 @@ async function daemon_start() {
if (newConfig) {
fs.writeFileSync('./config.json', newConfig)
configs = JSON.parse(newConfig)
MAX_MESSAGE_PER_USER = configs["MAX_MESSAGE_COUNT"] ? configs["MAX_MESSAGE_COUNT"] : 1000
console.log("[INFO] Shutting down MixIO Server...")
await mixio.stop();
serverStatus = false;