| 1076 | | |
| 1077 | | // CURLOPT_TIMEOUT and CURLOPT_CONNECTTIMEOUT expect integers. Have to use ceil since |
| 1078 | | // a value of 0 will allow an unlimited timeout. |
| 1079 | | $timeout = (int) ceil( $r['timeout'] ); |
| 1080 | | curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $timeout ); |
| 1081 | | curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout ); |
| 1082 | | |
| | 1076 | |
| | 1077 | // CURLOPT_TIMEOUT_MS and CURLOPT_CONNECTTIMEOUT_MS expect integers. Have to use ceil |
| | 1078 | // since a value of 0 will allow an unlimited timeout. |
| | 1079 | $timeout = (int) ceil( $r['timeout'] * 1000 ); |
| | 1080 | curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT_MS, $timeout); |
| | 1081 | // CURLOPT_TIMEOUT_MS is a string for some reason, it should be 155 |
| | 1082 | curl_setopt( $handle, 155, $timeout ); |
| | 1083 | |