- while (CURLM_CALL_MULTI_PERFORM == curl_multi_socket_all(pool->ch, &pool->unfinished));
- http_request_pool_update_timeout(pool);
-
- event_base_dispatch(HTTP_G->request.pool.event.base);
+ if (pool->useevents) {
+ while (CURLM_CALL_MULTI_PERFORM == curl_multi_socket_all(pool->ch, &pool->unfinished));
+ http_request_pool_update_timeout(pool);
+
+ event_base_dispatch(HTTP_G->request.pool.event.base);
+ } else
+#endif
+ {
+ while (http_request_pool_perform(pool)) {
+ if (SUCCESS != http_request_pool_select(pool)) {
+#ifdef PHP_WIN32
+ /* see http://msdn.microsoft.com/library/en-us/winsock/winsock/windows_sockets_error_codes_2.asp */
+ http_error_ex(HE_WARNING, HTTP_E_SOCKET, "WinSock error: %d", WSAGetLastError());