modify plugin name

This commit is contained in:
2022-06-22 10:23:09 +08:00
parent 8281a0fecb
commit ea7618ed1b
+10 -9
View File
@@ -212,16 +212,17 @@ class CoroutineServer implements ServerInterface
public function runServer(Coroutine\Http\Server|Coroutine\Server $server): void public function runServer(Coroutine\Http\Server|Coroutine\Server $server): void
{ {
$this->dispatch->dispatch(new OnWorkerStart($server, 0)); $this->dispatch->dispatch(new OnWorkerStart($server, 0));
try {
$server->start(); $server->start();
} catch (\Throwable $throwable) {
$this->dispatch->dispatch(new OnWorkerStop($server, 0)); $this->logger->error($throwable->getMessage(), [$throwable]);
} finally {
if ($this->isShutdown) { $this->dispatch->dispatch(new OnWorkerStop($server, 0));
return; if ($this->isShutdown) {
return;
}
$this->runServer($server);
} }
$this->runServer($server);
} }