update to 2.5.7 (build 425)

This commit is contained in:
crazywhalecc
2021-11-03 23:26:43 +08:00
parent d3c420ec84
commit 293740fee2
6 changed files with 39 additions and 14 deletions

View File

@@ -7,7 +7,6 @@ namespace ZM\Event\SwooleEvent;
use Swoole\Process;
use Swoole\WebSocket\Server;
use ZM\Annotation\Swoole\SwooleHandler;
use ZM\ConnectionManager\ManagerGM;
use ZM\Console\Console;
use ZM\Event\SwooleEvent;
@@ -23,10 +22,6 @@ class OnBeforeReload implements SwooleEvent
for ($i = 0; $i < ZM_WORKER_NUM; ++$i) {
Process::kill(zm_atomic("_#worker_" . $i)->get(), SIGUSR1);
}
foreach ($server->connections as $fd) {
if (ManagerGM::get($fd) !== null) $server->disconnect($fd);
else $server->close($fd);
}
usleep(800 * 1000);
}