Commit 33e522ee authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

winhttp/tests: Wait for a handle closing notification.

Fixes a Valgrind warning.
parent 7b660bb3
......@@ -88,7 +88,10 @@ static void CALLBACK check_notification( HINTERNET handle, DWORD_PTR context, DW
}
}
if (status_ok) info->index++;
if (status & WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS) SetEvent( info->wait );
if (status & (WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS | WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING))
{
SetEvent( info->wait );
}
}
static const struct notification cache_test[] =
......@@ -380,6 +383,8 @@ static void test_async( void )
WinHttpCloseHandle( req );
WinHttpCloseHandle( con );
WinHttpCloseHandle( ses );
WaitForSingleObject( info.wait, INFINITE );
CloseHandle( info.wait );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment