Skip to content

Commit 068d5dd

Browse files
committed
add curl timeout values
1 parent 04d7f2d commit 068d5dd

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/xmlapi.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,10 @@ private function curl_query($url, $postdata, $authstr)
741741
curl_setopt($curl, CURLOPT_URL, $url);
742742
// Increase buffer size to avoid "funny output" exception
743743
curl_setopt($curl, CURLOPT_BUFFERSIZE, 131072);
744-
744+
// set connect timeout to 10min, timeout to 20min
745+
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 600);
746+
curl_setopt($ch, CURLOPT_TIMEOUT, 1200);
747+
745748
// Pass authentication header
746749
$header[0] =$authstr .
747750
"Content-Type: application/x-www-form-urlencoded\r\n" .

0 commit comments

Comments
 (0)