mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-22 16:15:34 +08:00
update to 2.5.0-b2 (build 409)
This commit is contained in:
@@ -7,6 +7,7 @@ namespace ZM\Event\SwooleEvent;
|
||||
use Swoole\Server;
|
||||
use Swoole\Timer;
|
||||
use ZM\Annotation\Swoole\SwooleHandler;
|
||||
use ZM\ConnectionManager\ManagerGM;
|
||||
use ZM\Console\Console;
|
||||
use ZM\Event\SwooleEvent;
|
||||
|
||||
@@ -19,6 +20,10 @@ class OnWorkerExit implements SwooleEvent
|
||||
{
|
||||
public function onCall(Server $server, $worker_id) {
|
||||
Timer::clearAll();
|
||||
foreach($server->connections as $v) {
|
||||
$server->close($v);
|
||||
Console::info("Closing connection #".$v);
|
||||
}
|
||||
Console::info("正在结束 Worker #".$worker_id.",进程内可能有事务在运行...");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user