Skip to content

Commit f762239

Browse files
author
Daniel Neto
committed
Increase cURL timeout settings for improved reliability in Encoder class
1 parent cb3c94d commit f762239

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

objects/Encoder.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2254,10 +2254,11 @@ public static function sendToStreamer($target, $postFields, $return_vars = false
22542254
} catch (\Throwable $th) {
22552255
_error_log("sendToStreamer($target, " . json_encode($postFields));
22562256
}
2257+
$timeout = 10;
22572258
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
22582259
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
2259-
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
2260-
curl_setopt($curl, CURLOPT_TIMEOUT, 5);
2260+
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $timeout);
2261+
curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);
22612262

22622263
if (empty($curl)) {
22632264
$obj->msg = "sendToStreamer cURL is empty ";

0 commit comments

Comments
 (0)