Skip to content

Commit

Permalink
attempt to fix test on curl-master
Browse files Browse the repository at this point in the history
  • Loading branch information
m6w6 committed Oct 23, 2024
1 parent 9288cbe commit 45eb80a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/client028.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ class UserHandler implements http\Client\Curl\User
function once() {
echo "O";

foreach ($this->W as $w) {
foreach ($this->W as $w) if (is_resource($w)) {
call_user_func($this->run, $this->client, $w, self::POLL_OUT);
}
foreach ($this->R as $r) {
foreach ($this->R as $r) if (is_resource($r)) {
call_user_func($this->run, $this->client, $r, self::POLL_IN);
}
return count($this->client);
Expand Down
2 changes: 1 addition & 1 deletion tests/gh-issue50.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Test
http\Exception\RuntimeException: http\Client::dequeue(): Could not dequeue request while executing callbacks in %sgh-issue50.php:9
Stack trace:
#0 %sgh-issue50.php(9): http\Client->dequeue(Object(http\Client\Request))
#1 [internal function]: {closure}(Object(http\Client), Object(http\Client\Request), 18, 'GET / HTTP/1.1%s...')
#1 [internal function]: {closur%s}(Object(http\Client), Object(http\Client\Request), 18, 'GET / HTTP/1.1%s...')
#2 %sgh-issue50.php(14): http\Client->send()
#3 {main}
===DONE===
2 changes: 1 addition & 1 deletion tests/helper/server.inc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function serve($cb) {
logger("serve: Using port %d", $port);
do {
$R = array($server); $W = array(); $E = array();
$select = stream_select($R, $E, $E, 10, 0);
$select = stream_select($R, $E, $E, 1, 0);
if ($select && ($client = stream_socket_accept($server, 1))) {
logger("serve: Accept client %d", (int) $client);
if (getenv("PHP_HTTP_TEST_SSL")) {
Expand Down

0 comments on commit 45eb80a

Please sign in to comment.