@@ -33,7 +33,9 @@ discard block |
||
| 33 | 33 | $ms = microtime(); |
| 34 | 34 | do { |
| 35 | 35 | $this->curl->tick(); |
| 36 | - if ($this->concurrent >= $this->maxConcurrent) usleep(max(1, min(1000000, $this->usleep))); |
|
| 36 | + if ($this->concurrent >= $this->maxConcurrent) { |
|
| 37 | + usleep(max(1, min(1000000, $this->usleep))); |
|
| 38 | + } |
|
| 37 | 39 | } while ($this->concurrent >= $this->maxConcurrent); |
| 38 | 40 | return max(0, microtime() - $ms); |
| 39 | 41 | } |
@@ -95,7 +97,9 @@ discard block |
||
| 95 | 97 | $redis = isset($setup['etag']) ? $setup['etag'] : null; |
| 96 | 98 | if ($redis !== null && $params['callType'] == 'GET') { |
| 97 | 99 | $etag = $redis->get("guzzler:etags:" . $params['uri']); |
| 98 | - if ($etag != "") $setup['If-None-Match'] = $etag; |
|
| 100 | + if ($etag != "") { |
|
| 101 | + $setup['If-None-Match'] = $etag; |
|
| 102 | + } |
|
| 99 | 103 | } |
| 100 | 104 | unset($setup['etag']); |
| 101 | 105 | return $redis; |