Skip to content

Commit a2a8220

Browse files
committed
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: FD_ZERO file descriptors before calling curl_multi_fdset
2 parents 34c3985 + 936553d commit a2a8220

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/curl/streams.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ static size_t php_curl_stream_read(php_stream *stream, char *buf, size_t count T
162162
}
163163

164164
do {
165+
FD_ZERO(&curlstream->readfds);
166+
FD_ZERO(&curlstream->writefds);
167+
FD_ZERO(&curlstream->excfds);
168+
165169
/* get the descriptors from curl */
166170
curl_multi_fdset(curlstream->multi, &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &curlstream->maxfd);
167171

0 commit comments

Comments
 (0)