protected function initSwoole() { parent::initSwoole(); $server = $this->swoole; $server->on('WorkerStop', [$this, 'onWorkerStop']); $server->on('ManagerStop', [$this, 'onManagerStop']); }