Skip to content

Commit 59fe151

Browse files
authored
Add default timeouts to Guzzle Client (#2)
1 parent 2ba59e0 commit 59fe151

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/PayPalClient.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ class PayPalClient implements HttpClient
2727
public function __construct(Environment $environment)
2828
{
2929
$this->environment = $environment;
30-
$this->client = new Client(['base_uri' => $environment->baseUrl()]);
30+
$this->client = new Client([
31+
'base_uri' => $environment->baseUrl(),
32+
'timeout' => 30,
33+
'connect_timeout' => 10,
34+
]);
3135
$this->access_token = null;
3236
}
3337

0 commit comments

Comments
 (0)