This commit is contained in:
2020-09-07 15:26:22 +08:00
parent 2043456bdc
commit 5a6716ca3d
+12 -1
View File
@@ -94,7 +94,7 @@ class Server extends Application
$configs = Config::get('servers', true);
foreach ($configs as $config) {
if ($this->isUse($config['port'])) {
return $this->error('Port ' . $config['host'] . '::' . $config['port'] . ' is already.');
return $this->error_stop($config['host'], $config['port']);
}
}
$baseServer = $this->initCore($configs);
@@ -102,6 +102,17 @@ class Server extends Application
}
/**
* @param $host
* @param $Port
* @throws Exception
*/
public function error_stop($host, $Port)
{
$this->error(sprintf('Port %s::%d is already.', $host, $Port));
}
/**
* @return bool
*/