Skip to content

Commit 0aba960

Browse files
committed
refactor(http): address CURLRequest retry review feedback
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
1 parent 61dade9 commit 0aba960

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

system/HTTP/CURLRequest.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,7 @@ class CURLRequest extends OutgoingRequest
101101
*
102102
* @var list<int>
103103
*/
104-
protected $transientCurlErrors = [
105-
CURLE_COULDNT_RESOLVE_HOST,
106-
CURLE_COULDNT_CONNECT,
107-
CURLE_OPERATION_TIMEDOUT,
108-
CURLE_SEND_ERROR,
109-
CURLE_RECV_ERROR,
110-
];
104+
protected $transientCurlErrors = [];
111105

112106
/**
113107
* The number of milliseconds to delay before
@@ -159,6 +153,14 @@ public function __construct(App $config, URI $uri, ?ResponseInterface $response
159153
throw HTTPException::forMissingCurl(); // @codeCoverageIgnore
160154
}
161155

156+
$this->transientCurlErrors = [
157+
CURLE_COULDNT_RESOLVE_HOST,
158+
CURLE_COULDNT_CONNECT,
159+
CURLE_OPERATION_TIMEDOUT,
160+
CURLE_SEND_ERROR,
161+
CURLE_RECV_ERROR,
162+
];
163+
162164
parent::__construct(Method::GET, $uri);
163165

164166
$this->responseOrig = $response ?? new Response();

0 commit comments

Comments
 (0)