facebook / facebook/hhvm

Create async version of curl_init_pooled

Open
#7,725 6 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

### HHVM Version
3.18.1

### Standalone code, or other way to reproduce the problem
````
{
$curl = curl_init_pooled('mypool', "http://google.com");
print "REQUESTING $index\n";
await HH\Asio\curl_exec($curl);
print "FINISHED $index\n";
}, range(1,5));

\HH\Asio\join(\HH\Asio\v($awaitables));
````

### Expected result
````
REQUESTING 1
FINISHED 1
REQUESTING 2
FINISHED 2
REQUESTING 3
FINISHED 3
REQUESTING 4
FINISHED 4
REQUESTING 5
FINISHED 5
````

### Actual result
````
REQUESTING 1
(wait for 100000 ms here)
FINISHED 1

Fatal error: Uncaught exception 'RuntimeException' with message 'Timeout reached waiting for an available pooled curl connection!'
````

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.