改名
This commit is contained in:
@@ -308,6 +308,7 @@ class ServerManager
|
|||||||
/**
|
/**
|
||||||
* @param $port
|
* @param $port
|
||||||
* @return bool|string
|
* @return bool|string
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function checkPortIsAlready($port): bool|string
|
private function checkPortIsAlready($port): bool|string
|
||||||
{
|
{
|
||||||
@@ -317,6 +318,12 @@ class ServerManager
|
|||||||
$output = explode(PHP_EOL, $output[0]);
|
$output = explode(PHP_EOL, $output[0]);
|
||||||
return $output[0];
|
return $output[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$serverPid = file_get_contents(storage('server.pid'));
|
||||||
|
if (!empty($serverPid)) {
|
||||||
|
Process::kill($serverPid, SIGTERM);
|
||||||
|
}
|
||||||
|
|
||||||
exec('netstat -lnp | grep ' . $port . ' | grep "LISTEN" | awk \'{print $7}\'', $output);
|
exec('netstat -lnp | grep ' . $port . ' | grep "LISTEN" | awk \'{print $7}\'', $output);
|
||||||
if (empty($output)) {
|
if (empty($output)) {
|
||||||
return false;
|
return false;
|
||||||
@@ -423,7 +430,6 @@ class ServerManager
|
|||||||
/**
|
/**
|
||||||
* @param Port|Server $server
|
* @param Port|Server $server
|
||||||
* @param array|null $settings
|
* @param array|null $settings
|
||||||
* @throws NotFindClassException
|
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
*/
|
*/
|
||||||
public function bindCallback(Port|Server $server, ?array $settings = [])
|
public function bindCallback(Port|Server $server, ?array $settings = [])
|
||||||
|
|||||||
Reference in New Issue
Block a user