Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix bug with longer waits #17

Merged
merged 1 commit into from
Mar 29, 2024
Merged

fix bug with longer waits #17

merged 1 commit into from
Mar 29, 2024

Conversation

alexjeen
Copy link
Contributor

When the library encounters somewhat higher timeouts, it can crash with the following error (because it calculates a float value instead of a int value):

TypeError 

  usleep(): Argument #1 ($microseconds) must be of type int, float given

  at /var/app/vendor/stechstudio/backoff/src/Backoff.php:310
    306▕         if ($attempt == 0) {
    307▕             return;
    308▕         }
    309▕ 
  ➜ 310▕         usleep($this->getWaitTime($attempt) * 1000);
    311▕     }
    312▕ 
    313▕     /**
    314▕      * @param int $attempt

      +2 vendor frames 

  3   /var/app/app/Models/Testconfig.php:[92](https://github.com/elasticscale/elasticscale_module_deploy/actions/runs/8474497668/job/23220979717#step:7:93)
      STS\Backoff\Backoff::run()

@jszobody jszobody merged commit 1758371 into stechstudio:master Mar 29, 2024
@jszobody
Copy link
Member

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants