From: Paul Gofman pgofman@codeweavers.com
Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/winhttp/request.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 269af0826c0..2754dc29163 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -4145,13 +4145,18 @@ static void task_socket_close( void *ctx, BOOL abort ) struct socket *socket = (struct socket *)s->task_hdr.obj; DWORD ret;
- if (abort) return; + if (abort) + { + socket_close_complete( socket, ERROR_WINHTTP_OPERATION_CANCELLED ); + return; + }
TRACE("running %p\n", ctx);
ret = socket_close( socket ); receive_io_complete( socket ); - socket_close_complete( socket, ret ); + if (task_needs_completion( &s->task_hdr )) + socket_close_complete( socket, ret ); }
DWORD WINAPI WinHttpWebSocketClose( HINTERNET hsocket, USHORT status, void *reason, DWORD len )