This commit is contained in:
Cloud Wu
2015-09-04 12:14:09 +08:00
parent 7797de85b4
commit 6c33f7bc44

View File

@@ -118,13 +118,12 @@ function CMD.monitor(name, obj)
return v.obj
end
local n = pool_count[name].n
pool_count[name].n = n + 1
local n = pool_count[name].n + 1
if n > pool_count[name].threshold then
n = n - check_watch(v.watch)
pool_count[name].threshold = n * 2
pool_count[name].n = n
end
pool_count[name].n = n
table.insert(v.watch, skynet.response())