fix: validateconnection

This commit is contained in:
Andras Bacsai
2024-11-22 15:50:52 +01:00
parent 377758edcd
commit 7d089ba1a9
2 changed files with 4 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ class CheckProxy
if (is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop) { if (is_null($proxyType) || $proxyType === 'NONE' || $server->proxy->force_stop) {
return false; return false;
} }
['uptime' => $uptime, 'error' => $error] = $server->validateConnection(false); ['uptime' => $uptime, 'error' => $error] = $server->validateConnection();
if (! $uptime) { if (! $uptime) {
throw new \Exception($error); throw new \Exception($error);
} }

View File

@@ -988,7 +988,7 @@ $schema://$host {
public function status(): bool public function status(): bool
{ {
['uptime' => $uptime] = $this->validateConnection(false); ['uptime' => $uptime] = $this->validateConnection();
if ($uptime === false) { if ($uptime === false) {
foreach ($this->applications() as $application) { foreach ($this->applications() as $application) {
$application->status = 'exited'; $application->status = 'exited';
@@ -1051,9 +1051,9 @@ $schema://$host {
$this->team->notify(new Unreachable($this)); $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()) { if ($this->skipServer()) {
return ['uptime' => false, 'error' => 'Server skipped.']; return ['uptime' => false, 'error' => 'Server skipped.'];