This commit is contained in:
as2252258@163.com
2021-04-09 03:14:08 +08:00
parent f36d46bcdc
commit b654e7b76e
+3 -6
View File
@@ -48,12 +48,9 @@ class OnWorkerStart extends Callback
putenv('state=start');
putenv('worker=' . $worker_id);
$isWorker = $this->isWorker($worker_id);
if ($this->injectLoader($isWorker)) {
$this->onWorker($server, $worker_id);
} else {
$this->onTask($server);
}
$isWorker = $this->injectLoader($this->isWorker($worker_id));
$this->{$isWorker ? 'onWorker' : 'onTask'}($server);
}