mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
catch error , see #726
This commit is contained in:
@@ -57,8 +57,11 @@ function skynet.forward_type(map, start_func)
|
|||||||
if prototype then
|
if prototype then
|
||||||
dispatch_message(prototype, msg, sz, ...)
|
dispatch_message(prototype, msg, sz, ...)
|
||||||
else
|
else
|
||||||
dispatch_message(ptype, msg, sz, ...)
|
local ok, err = pcall(dispatch_message, ptype, msg, sz, ...)
|
||||||
c.trash(msg, sz)
|
c.trash(msg, sz)
|
||||||
|
if not ok then
|
||||||
|
error(err)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end, true)
|
end, true)
|
||||||
skynet.timeout(0, function()
|
skynet.timeout(0, function()
|
||||||
|
|||||||
Reference in New Issue
Block a user