mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
skynet.dispatch can replace old func
This commit is contained in:
@@ -417,8 +417,9 @@ end
|
||||
function skynet.dispatch(typename, func)
|
||||
local p = proto[typename]
|
||||
if func then
|
||||
assert(p and (p.dispatch == nil), tostring(typename))
|
||||
local ret = p.dispatch
|
||||
p.dispatch = func
|
||||
return ret
|
||||
else
|
||||
return p and p.dispatch
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user