1

I am using 2.5.5 version of pecl_http library in my code (https://mdref.m6w6.name/http).

$httpRequest = new \http\Client\Request("GET", $url);
$httpRequest->setOptions(["timeout"=>0.5]);
$client = new \http\Client;
$client->enqueue($httpRequest)->send();
$response = $client->getResponse();

If I set the timeout to 0.5 (500 milliseconds), it seems to return immediately on connection timeout. If I set it to say > 1, it seems to obey the timeout.

Is it a known issue?

ssk
  • 9,045
  • 26
  • 96
  • 169
  • Possibly an issue. It does use `CURLOPT_CONNECTTIMEOUT_MS` under the hood so it should work. I'm not quite clear on how it's failing though, can you clarify? – drew010 Nov 22 '17 at 02:45

0 Answers0