Fix CURL swallowing multiple packets into one

This commit is contained in:
doylet 2025-11-14 19:26:11 +11:00
parent 0d55b5d459
commit 92d6b7c675

View File

@ -314,6 +314,8 @@ static int32_t DN_NET_CurlThreadEntryPoint_(DN_OSThread *thread)
// > If this is not a complete fragment, the bytesleft field informs about how many
// additional bytes are expected to arrive before this fragment is complete.
curl_req->ws_has_more |= meta && meta->bytesleft > 0;
if (!curl_req->ws_has_more)
break;
}
// NOTE: curl_ws_recv returns CURLE_GOT_NOTHING if the associated connection is closed.