diff options
Diffstat (limited to 'server/src/async/async.lua')
-rw-r--r-- | server/src/async/async.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/async/async.lua b/server/src/async/async.lua index 953cf5cf..b385aac8 100644 --- a/server/src/async/async.lua +++ b/server/src/async/async.lua @@ -72,12 +72,12 @@ end local function callback(id, running) if running.callback then while true do - local ok, result = running.task.response:pop() - if not ok then + local results = table.pack(running.task.response:pop()) + if not results[1] then break end -- TODO 封装成对象 - local suc, destroy = xpcall(running.callback, log.error, result) + local suc, destroy = xpcall(running.callback, log.error, table.unpack(results, 2)) if not suc or destroy then RunningList[id] = nil IdlePool[#IdlePool+1] = running.task |