Skip to content

Commit

Permalink
Merge branch 'PHP-5.4'
Browse files Browse the repository at this point in the history
* PHP-5.4:
  Avoid calling select if maxfd returned by curl_multi_fdset is -1
  Fixing NEWS file
  • Loading branch information
adoy committed Sep 22, 2012
2 parents 70713a2 + c8687ee commit 6c135df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/curl/multi.c
Expand Up @@ -191,6 +191,9 @@ PHP_FUNCTION(curl_multi_select)
FD_ZERO(&exceptfds);

curl_multi_fdset(mh->multi, &readfds, &writefds, &exceptfds, &maxfd);
if (maxfd == -1) {
RETURN_LONG(-1);
}
RETURN_LONG(select(maxfd + 1, &readfds, &writefds, &exceptfds, &to));
}
/* }}} */
Expand Down

0 comments on commit 6c135df

Please sign in to comment.