diff --git a/src/Command/Inspector/Settings/LoopSettings.php b/src/Command/Inspector/Settings/LoopSettings.php index 059306a9..9b763c0c 100644 --- a/src/Command/Inspector/Settings/LoopSettings.php +++ b/src/Command/Inspector/Settings/LoopSettings.php @@ -20,7 +20,7 @@ class LoopSettings { private const SLEEP_NANO_SECONDS_DEFAULT = 1000 * 1000 * 10; private const CANCEL_KEY_DEFAULT = 'q'; - private const MAX_RETRY_DEFAULT = 10; + private const MAX_RETRY_DEFAULT = -1; public int $sleep_nano_seconds; public string $cancel_key; diff --git a/src/Lib/Loop/LoopProcess/RetryOnExceptionLoop.php b/src/Lib/Loop/LoopProcess/RetryOnExceptionLoop.php index 3ab0be59..a03040e4 100644 --- a/src/Lib/Loop/LoopProcess/RetryOnExceptionLoop.php +++ b/src/Lib/Loop/LoopProcess/RetryOnExceptionLoop.php @@ -39,7 +39,7 @@ public function __construct(int $max_retry, array $exception_names, LoopProcessI public function invoke(): bool { - while ($this->current_retry_count <= $this->max_retry) { + while ($this->current_retry_count <= $this->max_retry or $this->max_retry === -1) { try { $result = $this->chain->invoke(); $this->current_retry_count = 0;