modify plugin name

This commit is contained in:
2022-06-23 10:44:06 +08:00
parent 9d9fdba690
commit 43bb7c97d6
3 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ class AsyncServer implements ServerInterface
/** /**
* @return void * @return void
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface|ReflectionException
*/ */
public function shutdown(): void public function shutdown(): void
{ {
+8 -4
View File
@@ -16,13 +16,17 @@ trait TraitServer
/** /**
* @param array $class * @param string|array $class
* @return void * @return void
*/ */
public function addProcess(array $class): void public function addProcess(string|array $class): void
{ {
foreach ($class as $item) { if (is_string($class)) {
$this->_process[] = $item; $this->_process[] = $class;
} else {
foreach ($class as $name) {
$this->_process[] = $name;
}
} }
} }
+1 -1
View File
@@ -175,7 +175,7 @@ class Server extends HttpService
$reload = Config::get('reload.hot', false); $reload = Config::get('reload.hot', false);
if ($reload !== false) { if ($reload !== false) {
$this->provider->on(OnWorkerStart::class, [$this, 'LoadRoutingList']); $this->provider->on(OnWorkerStart::class, [$this, 'LoadRoutingList']);
$this->processManager->add(Scaner::class); $this->manager->addProcess(Scaner::class);
} else { } else {
$this->LoadRoutingList(); $this->LoadRoutingList();
} }