diff --git a/lualib/skynet/queue.lua b/lualib/skynet/queue.lua index 9f40e2473..1b6799026 100644 --- a/lualib/skynet/queue.lua +++ b/lualib/skynet/queue.lua @@ -1,6 +1,7 @@ local skynet = require "skynet" local coroutine = coroutine -local pcall = pcall +local xpcall = xpcall +local traceback = debug.traceback local table = table function skynet.queue() @@ -17,7 +18,7 @@ function skynet.queue() assert(ref == 0) end ref = ref + 1 - local ok, err = pcall(f, ...) + local ok, err = xpcall(f, traceback, ...) ref = ref - 1 if ref == 0 then current_thread = nil @@ -30,4 +31,4 @@ function skynet.queue() end end -return skynet.queue \ No newline at end of file +return skynet.queue