modify plugin name

This commit is contained in:
2022-06-17 12:27:33 +08:00
parent 7fdf83cd3a
commit f85d2aa0a2
3 changed files with 12 additions and 2 deletions
+4 -1
View File
@@ -27,7 +27,7 @@ abstract class BaseProcess implements OnProcessInterface
protected bool $enable_coroutine = true;
public string $name = 'swoole process.';
public string $name = '';
/**
@@ -35,6 +35,9 @@ abstract class BaseProcess implements OnProcessInterface
*/
public function getName(): string
{
if (empty($this->name)) {
return uniqid('p.');
}
return $this->name;
}