[PATCH 0/1] MR10833: winhttp: Always queue async writes.
From: Hans Leidekker <hans@codeweavers.com> --- dlls/winhttp/request.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 78c2e731665..b1f13eafbb5 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -3641,7 +3641,6 @@ BOOL WINAPI WinHttpWriteData( HINTERNET hrequest, const void *buffer, DWORD to_w { DWORD ret; struct request *request; - BOOL async; TRACE( "%p, %p, %lu, %p\n", hrequest, buffer, to_write, written ); @@ -3657,9 +3656,9 @@ BOOL WINAPI WinHttpWriteData( HINTERNET hrequest, const void *buffer, DWORD to_w return FALSE; } - if (!(async = request->connect->hdr.flags & WINHTTP_FLAG_ASYNC) || request->hdr.recursion_count <= RECURSION_LIMIT) + if (!(request->connect->hdr.flags & WINHTTP_FLAG_ASYNC)) { - ret = write_data( request, buffer, to_write, written, async ); + ret = write_data( request, buffer, to_write, written, FALSE ); } else { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10833
I was overly surprised if specifically WinHttpWriteData is always asynchronous given that anything else is not and that socket send can virtually never block on Windows. But I did an ad-hoc test and indeed that looks to be the case on Windows. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10833#note_139063
Yes, it surprised me too. Xbox live sign in was broken because of this (not consistently, I guess it depended on scheduling or network latency) because it called WinHttpWriteData() again from the completion handler, which would result in a server error. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10833#note_139070
participants (3)
-
Hans Leidekker -
Hans Leidekker (@hans) -
Paul Gofman (@gofman)