From 3e59842fd979ca2d904b7dd85bc307b650f4cf87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 30 Sep 2026 11:25:55 -0600 Subject: [PATCH] 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) --- ext/naett-lib/src/naett_win.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/naett-lib/src/naett_win.c b/ext/naett-lib/src/naett_win.c index d9bfcb9ae2..253f83da4e 100644 --- a/ext/naett-lib/src/naett_win.c +++ b/ext/naett-lib/src/naett_win.c @@ -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;