mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
see pr #332
This commit is contained in:
@@ -118,13 +118,12 @@ function CMD.monitor(name, obj)
|
|||||||
return v.obj
|
return v.obj
|
||||||
end
|
end
|
||||||
|
|
||||||
local n = pool_count[name].n
|
local n = pool_count[name].n + 1
|
||||||
pool_count[name].n = n + 1
|
|
||||||
if n > pool_count[name].threshold then
|
if n > pool_count[name].threshold then
|
||||||
n = n - check_watch(v.watch)
|
n = n - check_watch(v.watch)
|
||||||
pool_count[name].threshold = n * 2
|
pool_count[name].threshold = n * 2
|
||||||
pool_count[name].n = n
|
|
||||||
end
|
end
|
||||||
|
pool_count[name].n = n
|
||||||
|
|
||||||
table.insert(v.watch, skynet.response())
|
table.insert(v.watch, skynet.response())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user