Skip to content

Commit c8687ee

Browse files
committed
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: Avoid calling select if maxfd returned by curl_multi_fdset is -1
2 parents 734bda7 + 2e8ab65 commit c8687ee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/curl/multi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ PHP_FUNCTION(curl_multi_select)
191191
FD_ZERO(&exceptfds);
192192

193193
curl_multi_fdset(mh->multi, &readfds, &writefds, &exceptfds, &maxfd);
194+
if (maxfd == -1) {
195+
RETURN_LONG(-1);
196+
}
194197
RETURN_LONG(select(maxfd + 1, &readfds, &writefds, &exceptfds, &to));
195198
}
196199
/* }}} */

0 commit comments

Comments
 (0)