mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
add skynet.harbor.linkmaster
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
local skynet = require "skynet"
|
||||
local harbor = require "skynet.harbor"
|
||||
|
||||
local function monitor_master()
|
||||
harbor.linkmaster()
|
||||
print("master is down")
|
||||
skynet.exit()
|
||||
end
|
||||
|
||||
skynet.start(function()
|
||||
print("Log server start")
|
||||
skynet.monitor "simplemonitor"
|
||||
local log = skynet.newservice("globallog")
|
||||
skynet.exit()
|
||||
skynet.fork(monitor_master)
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user