update to 2.2.2 version

fix QQBot error
clean code
This commit is contained in:
jerry
2021-01-29 22:27:10 +08:00
parent a55cd4ed05
commit f3e844bb0a
11 changed files with 41 additions and 13 deletions

View File

@@ -501,6 +501,10 @@ class ServerEventHandler
//unset(Context::$context[Co::getCid()]);
$data = json_decode($data, true);
switch ($data["action"] ?? '') {
case "resume_ws_message":
$obj = $data["data"];
Co::resume($obj["coroutine"]);
break;
case "getWorkerCache":
$r = WorkerCache::get($data["key"]);
$action = ["action" => "returnWorkerCache", "cid" => $data["cid"], "value" => $r];