fix
This commit is contained in:
parent
0126286731
commit
ba769f5fb7
2 changed files with 3 additions and 3 deletions
|
|
@ -45,7 +45,7 @@ public function __construct(public Server $server)
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
if (!$this->server->isServerReady($this->tries)) {
|
if (!$this->server->isServerReady($this->tries)) {
|
||||||
throw new \RuntimeException('Server is not ready.');
|
throw new \RuntimeException('Server is not reachable.');
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
if ($this->server->isSwarm()) {
|
if ($this->server->isSwarm()) {
|
||||||
|
|
|
||||||
|
|
@ -149,10 +149,10 @@ public function skipServer()
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
public function isServerReady($tries)
|
public function isServerReady(int $tries = 3)
|
||||||
{
|
{
|
||||||
$serverUptimeCheckNumber = $this->unreachable_count + 1;
|
$serverUptimeCheckNumber = $this->unreachable_count + 1;
|
||||||
$serverUptimeCheckNumberMax = $tries ?? 3;
|
$serverUptimeCheckNumberMax = $tries;
|
||||||
|
|
||||||
ray('server: ' . $this->name);
|
ray('server: ' . $this->name);
|
||||||
ray('serverUptimeCheckNumber: ' . $serverUptimeCheckNumber);
|
ray('serverUptimeCheckNumber: ' . $serverUptimeCheckNumber);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue