summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2019-12-15 15:43:18 +0800
committerGitHub <[email protected]>2019-12-15 15:43:18 +0800
commit77c589d08366ec183f03e54106f0899ec127feb9 (patch)
treebd6f75569c79cdd3aed5ea64e52d413c5ccb2fe0
parentf0cee734ed73e82364c07158b680d1399464a13e (diff)
improve the timeout tasks for scheduler
-rw-r--r--xmake/core/base/scheduler.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/base/scheduler.lua b/xmake/core/base/scheduler.lua
index eefb46694..b8f3ca8c1 100644
--- a/xmake/core/base/scheduler.lua
+++ b/xmake/core/base/scheduler.lua
@@ -297,8 +297,8 @@ function scheduler:sock_wait(sock, events, timeout)
local timer_task = nil
if timeout > 0 then
timer_task = self:_timer():post(function (cancel)
- print(cancel, running)
if not cancel and running:is_suspended() then
+ self:_co_suspended_set(sock, nil)
self:co_resume(running, 0)
end
end, timeout)