Skip to content

Commit

Permalink
使用SIGUSR1重载
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Feb 1, 2020
1 parent 50a1861 commit 1a2e324
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,8 @@ blockList:
## 拆分配置文件
参阅 [/config](/config)

## 重载
mcproxy支持无中断重载,通过向master进程发送SIGUSR1信号即可实现

## bungeecord模式
找到spigot.yml,修改settings.bungeecord为true,重启服务器即可
2 changes: 1 addition & 1 deletion bin/mcproxy
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minecraft-proxy",
"version": "1.0.0-rc0",
"version": "1.0.2",
"description": "ProxyPass minecraft",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 1a2e324

Please sign in to comment.