Skip to content

Commit 96c59da

Browse files
authored
Fix msvc C4067 warns (#911)
* fix msvc C4067 warns * fix msvc C4067 warns * fix msvc C4067 warns
1 parent c18e4f0 commit 96c59da

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

Source/HTTP/Curl/CurlMulti.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +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 || 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)
261271
// Try curl_multi_poll first, fall back to curl_multi_wait if not available
262272
// For non-GDK, CURL_CALL expands directly to the symbol
263273
if (CURL_CALL(curl_multi_poll))

0 commit comments

Comments
 (0)