update to 2.2.4 version

update docs
fix broken ssh caused cpu overloading
fix WorkerCache bug when no global config
add global function zm_atomic
This commit is contained in:
jerry
2021-02-07 11:46:42 +08:00
parent 517d258d61
commit 0c9f246690
15 changed files with 315 additions and 12 deletions

View File

@@ -62,7 +62,12 @@ class ServerEventHandler
if ($terminal_id !== null) {
ZMBuf::$terminal = $r = STDIN;
Event::add($r, function () use ($r) {
$var = trim(fgets($r));
$fget = fgets($r);
if ($fget === false) {
Event::del($r);
return;
}
$var = trim($fget);
try {
Terminal::executeCommand($var, $r);
} catch (Exception $e) {
@@ -405,7 +410,7 @@ class ServerEventHandler
if (($a = ZMConfig::get("global", "access_token")) != "") {
if ($access_token !== $a) {
$server->close($request->fd);
Console::warning("Unauthorized access_token: ".$access_token);
Console::warning("Unauthorized access_token: " . $access_token);
return;
}
}