From 1a2e32411db25ce325769c45dcca384b9391cbe2 Mon Sep 17 00:00:00 2001 From: bangbang93 Date: Sat, 1 Feb 2020 22:01:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8SIGUSR1=E9=87=8D=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +++ bin/mcproxy | 2 +- package.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9c64a7a..8543a75 100644 --- a/README.md +++ b/README.md @@ -73,5 +73,8 @@ blockList: ## 拆分配置文件 参阅 [/config](/config) +## 重载 +mcproxy支持无中断重载,通过向master进程发送SIGUSR1信号即可实现 + ## bungeecord模式 找到spigot.yml,修改settings.bungeecord为true,重启服务器即可 diff --git a/bin/mcproxy b/bin/mcproxy index 6e7dc2c..c0cf80d 100644 --- a/bin/mcproxy +++ b/bin/mcproxy @@ -50,7 +50,7 @@ function setupWorker(workerId) { } function setupMaster() { - process.on('SIGHUP', async () => { + process.on('SIGUSR1', async () => { const config = await loadConfig() Logger.info('got sighup, reloading') for (const worker of workers.values()) { diff --git a/package.json b/package.json index 88fc2b7..62e6b78 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minecraft-proxy", - "version": "1.0.0-rc0", + "version": "1.0.2", "description": "ProxyPass minecraft", "main": "index.js", "scripts": {