Fix type convert error

This commit is contained in:
crazywhalecc
2022-03-26 14:51:25 +08:00
parent b6e135a642
commit 971f03ae0f
3 changed files with 4 additions and 7 deletions

View File

@@ -33,7 +33,7 @@ class ServerStopCommand extends DaemonCommand
$name = explode('.', $file);
if (end($name) == 'pid') {
$pid = file_get_contents($file_path . '/' . $file);
Process::kill($pid, SIGKILL);
Process::kill((int) $pid, SIGKILL);
} elseif ($file === 'master.json') {
$json = json_decode(file_get_contents($file_path . '/' . $file), true);
Process::kill($json['pid'], SIGKILL);