改名
This commit is contained in:
@@ -251,6 +251,9 @@ class Server extends Application
|
|||||||
if (!($this->baseServer instanceof \Swoole\Server)) {
|
if (!($this->baseServer instanceof \Swoole\Server)) {
|
||||||
$class = $this->dispatch($config['type']);
|
$class = $this->dispatch($config['type']);
|
||||||
$this->baseServer = new $class($config['host'], $config['port'], SWOOLE_PROCESS, $config['mode']);
|
$this->baseServer = new $class($config['host'], $config['port'], SWOOLE_PROCESS, $config['mode']);
|
||||||
|
if (!isset($settings['pid_file'])) {
|
||||||
|
$settings['pid_file'] = APP_PATH . 'storage/server.pid';
|
||||||
|
}
|
||||||
$this->baseServer->set($settings);
|
$this->baseServer->set($settings);
|
||||||
$this->bindAnnotation();
|
$this->bindAnnotation();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+3
-4
@@ -158,11 +158,11 @@ if (!function_exists('storage')) {
|
|||||||
{
|
{
|
||||||
$basePath = Snowflake::getStoragePath();
|
$basePath = Snowflake::getStoragePath();
|
||||||
if (empty($path)) {
|
if (empty($path)) {
|
||||||
$fileName = $basePath . '/' . $fileName;
|
$fileName = rtrim($basePath, '/') . '/' . $fileName;
|
||||||
} else if (empty($fileName)) {
|
} else if (empty($fileName)) {
|
||||||
$fileName = initDir($basePath, $path);
|
$fileName = rtrim(initDir($basePath, $path));
|
||||||
} else {
|
} else {
|
||||||
$fileName = initDir($basePath, $path) . '/' . $fileName;
|
$fileName = rtrim(initDir($basePath, $path)) . '/' . $fileName;
|
||||||
}
|
}
|
||||||
if (!file_exists($fileName)) {
|
if (!file_exists($fileName)) {
|
||||||
touch($fileName);
|
touch($fileName);
|
||||||
@@ -301,7 +301,6 @@ if (!function_exists('merge')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!function_exists('jTraceEx')) {
|
if (!function_exists('jTraceEx')) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user