fix OnTick context bug

This commit is contained in:
whale
2020-05-10 14:40:18 +08:00
parent 886816e3d5
commit 013c78dc77

View File

@@ -196,7 +196,8 @@ class EventHandler
Console::warning("API 激活事件异常!");
return;
}
$content = ctx()->copy();
if (ctx() === null) $content = [];
else $content = ctx()->copy();
go(function () use ($action, $reply, $connection, $content) {
set_coroutine_params($content);
context()->setCache("action", $action);