diff --git a/examples/simplemonitor.lua b/examples/simplemonitor.lua index 1528bb50..ec294d21 100644 --- a/examples/simplemonitor.lua +++ b/examples/simplemonitor.lua @@ -12,7 +12,7 @@ skynet.register_protocol { local w = service_map[address] if w then for watcher in pairs(w) do - skynet.redirect(watcher, address, "error", "") + skynet.redirect(watcher, address, "error", 0, "") end service_map[address] = false end diff --git a/lualib/skynet.lua b/lualib/skynet.lua index 2019f530..e2e274af 100644 --- a/lualib/skynet.lua +++ b/lualib/skynet.lua @@ -569,6 +569,7 @@ function skynet.monitor(service, query) end assert(monitor, "Monitor launch failed") c.command("MONITOR", string.format(":%08x", monitor)) + return monitor end function skynet.mqlen()