This commit is contained in:
2021-03-02 12:39:01 +08:00
parent 53b8262588
commit 26a4b8190a
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -180,9 +180,9 @@ class Server extends HttpService
}
foreach ($port as $value) {
if (Snowflake::isLinux()) {
Coroutine\System::exec('netstat -tunlp | grep ' . $value['port'], $output);
$output = Coroutine\System::exec('netstat -tunlp | grep ' . $value['port']);
} else {
Coroutine\System::exec('lsof -i :' . $value['port'] . ' | grep -i "LISTEN"', $output);
$output = Coroutine\System::exec('lsof -i :' . $value['port'] . ' | grep -i "LISTEN"');
}
if (!empty($output)) {
return true;