Skip to content

Commit 2f9becd

Browse files
committed
fix msvc C4067 warns
1 parent 588130d commit 2f9becd

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Source/HTTP/Curl/CurlMulti.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,17 @@ HRESULT CurlMulti::Perform() noexcept
257257
{
258258
// Reschedule Perform if there are still running requests
259259
int workAvailable{ 0 };
260-
#if HC_PLATFORM == HC_PLATFORM_GDK || \
261-
(defined(CURL_AT_LEAST_VERSION) && (CURL_AT_LEAST_VERSION(7,66,0)))
260+
#if HC_PLATFORM == HC_PLATFORM_GDK
261+
// Try curl_multi_poll first, fall back to curl_multi_wait if not available
262+
if (CURL_CALL(curl_multi_poll))
263+
{
264+
result = CURL_CALL(curl_multi_poll)(m_curlMultiHandle, nullptr, 0, POLL_TIMEOUT_MS, &workAvailable);
265+
}
266+
else
267+
{
268+
result = CURL_CALL(curl_multi_wait)(m_curlMultiHandle, nullptr, 0, POLL_TIMEOUT_MS, &workAvailable);
269+
}
270+
#elif defined(CURL_AT_LEAST_VERSION) && CURL_AT_LEAST_VERSION(7,69,0)
262271
// Try curl_multi_poll first, fall back to curl_multi_wait if not available
263272
// For non-GDK, CURL_CALL expands directly to the symbol
264273
if (CURL_CALL(curl_multi_poll))

0 commit comments

Comments
 (0)