[PATCH v2 2/2] winhttp: Process end of read data before sending callback in read_data().
Paul Gofman
pgofman at codeweavers.com
Fri Oct 15 08:59:49 CDT 2021
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
dlls/winhttp/request.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index c908e26956f..d76edfa71d7 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -1848,6 +1848,7 @@ static DWORD read_data( struct request *request, void *buffer, DWORD size, DWORD
done:
TRACE( "retrieved %u bytes (%u/%u)\n", bytes_read, request->content_read, request->content_length );
+ if (end_of_read_data( request )) finished_reading( request );
if (async)
{
if (!ret) send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_READ_COMPLETE, buffer, bytes_read );
@@ -1861,7 +1862,6 @@ done:
}
if (!ret && read) *read = bytes_read;
- if (end_of_read_data( request )) finished_reading( request );
return ret;
}
--
2.31.1
More information about the wine-devel
mailing list