Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | private function callAndRetry(callable $callable, RetryStrategy $strategy, RetryConnection $connection) |
||
19 | { |
||
20 | do { |
||
21 | try { |
||
22 | return @$callable(); |
||
23 | } catch (Exception $exception) { |
||
24 | if (!$strategy->shouldRetry($exception, $connection)) { |
||
25 | // stop trying |
||
26 | throw $exception; |
||
27 | } |
||
28 | } |
||
29 | } while (true); |
||
30 | } |
||
31 | } |
||
32 |