Skip to content

Commit

Permalink
change the default setting to retry infinitely on read errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sj-i committed Jun 5, 2020
1 parent c74771e commit d34868b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Command/Inspector/Settings/LoopSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Lib/Loop/LoopProcess/RetryOnExceptionLoop.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d34868b

Please sign in to comment.