This commit is contained in:
2023-07-20 15:02:06 +08:00
parent 4ada7bbd1c
commit 1fe416c4c4
+3 -3
View File
@@ -11,7 +11,7 @@ use Kiri\Server\Events\OnShutdown;
use Kiri\Server\Events\OnTaskerStart; use Kiri\Server\Events\OnTaskerStart;
use Kiri\Server\Events\OnWorkerStart; use Kiri\Server\Events\OnWorkerStart;
use Kiri\Server\Events\OnWorkerStop; use Kiri\Server\Events\OnWorkerStop;
use Kiri\Server\Abstracts\CoroutineServer; use Kiri\Server\Abstracts\AsyncServer;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
use ReflectionException; use ReflectionException;
@@ -45,14 +45,14 @@ class Server
*/ */
public function __construct() public function __construct()
{ {
$this->class = \config('server.type', CoroutineServer::class); $this->class = \config('server.type', AsyncServer::class);
} }
/** /**
* @throws ReflectionException * @throws ReflectionException
*/ */
private function manager(): CoroutineServer private function manager(): AsyncServer
{ {
return Kiri::getDi()->get($this->class); return Kiri::getDi()->get($this->class);
} }