Skip to content

Commit fb62c0e

Browse files
jepsterPeter Majmesku
andauthored
Introduce timeout to cURL exec from .env file (#533)
* Changed project name * Can we use the original project name? * feat: #WPLZ-166 - introduce timeout --------- Co-authored-by: Peter Majmesku <majmesku@publicplan.de>
1 parent 83d4f8d commit fb62c0e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/JiraClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ public function exec(string $context, array|string $post_data = null, string $cu
197197

198198
curl_reset($this->curl);
199199
$ch = $this->curl;
200+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->configuration->getTimeout());
201+
curl_setopt($ch, CURLOPT_TIMEOUT, $this->configuration->getTimeout());
200202
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
201203
curl_setopt($ch, CURLOPT_URL, $url);
202204

0 commit comments

Comments
 (0)