fix: validateconnection
This commit is contained in:
parent
377758edcd
commit
7d089ba1a9
2 changed files with 4 additions and 4 deletions
|
|
@ -30,7 +30,7 @@ public function handle(Server $server, $fromUI = false): bool
|
|||
if (is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop) {
|
||||
return false;
|
||||
}
|
||||
['uptime' => $uptime, 'error' => $error] = $server->validateConnection(false);
|
||||
['uptime' => $uptime, 'error' => $error] = $server->validateConnection();
|
||||
if (! $uptime) {
|
||||
throw new \Exception($error);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -988,7 +988,7 @@ public function serverStatus(): bool
|
|||
|
||||
public function status(): bool
|
||||
{
|
||||
['uptime' => $uptime] = $this->validateConnection(false);
|
||||
['uptime' => $uptime] = $this->validateConnection();
|
||||
if ($uptime === false) {
|
||||
foreach ($this->applications() as $application) {
|
||||
$application->status = 'exited';
|
||||
|
|
@ -1051,9 +1051,9 @@ public function sendUnreachableNotification()
|
|||
$this->team->notify(new Unreachable($this));
|
||||
}
|
||||
|
||||
public function validateConnection(bool $isManualCheck = true, bool $justCheckingNewKey = false)
|
||||
public function validateConnection(bool $justCheckingNewKey = false)
|
||||
{
|
||||
config()->set('constants.ssh.mux_enabled', ! $isManualCheck);
|
||||
config()->set('constants.ssh.mux_enabled', false);
|
||||
|
||||
if ($this->skipServer()) {
|
||||
return ['uptime' => false, 'error' => 'Server skipped.'];
|
||||
|
|
|
|||
Loading…
Reference in a new issue