naett: Complete a Windows request when WinHttpWriteData fails

The return value was ignored, and after a synchronous failure no further
callback arrives, so the request never completed. During achievement game
identification, that blocked boot indefinitely.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-09-30 11:25:55 -06:00
1 parent 21963d4534
commit 3e59842fd9
1 file changed
+6 -1
+6 -1
View File
@@ -219,7 +219,12 @@ callback(HINTERNET request, DWORD_PTR context, DWORD status, LPVOID statusInform
int bytesRead = res->request->options.bodyReader(
res->buffer, sizeof(res->buffer), res->request->options.bodyReaderData);
if (bytesRead) {
WinHttpWriteData(request, res->buffer, bytesRead, NULL);
// PPSSPP: upstream ignored a failure here, and with no further callback coming,
// the request never completed.
if (!WinHttpWriteData(request, res->buffer, bytesRead, NULL)) {
res->code = naettWriteError;
naettSetComplete(res);
}
} else {
if (!WinHttpReceiveResponse(request, NULL)) {
res->code = naettReadError;