use a patch to hotfix

This commit is contained in:
Cloud Wu
2014-04-17 13:49:25 +08:00
parent 58dfe38c4b
commit 6d4d9f8758
4 changed files with 88 additions and 91 deletions

View File

@@ -11,13 +11,7 @@ skynet.start(function()
local command = method[3]
if command == "hotfix" then
local hotfix = require "snax_hotfix"
local ok, msg = hotfix(func, ...)
if ok then
local hf = func[id][4]
skynet.ret(skynet.pack(pcall(hf, select(2,...))))
else
skynet.ret(skynet.pack(ok, msg))
end
skynet.ret(skynet.pack(hotfix(func, ...)))
elseif command == "init" then
assert(not init, "Already init")
local initfunc = method[4] or function() end