winhttp/tests: Wait for a handle closing notification.

Fixes a Valgrind warning.
This commit is contained in:
Hans Leidekker 2010-02-17 09:56:19 +01:00 committed by Alexandre Julliard
parent 7b660bb3d8
commit 33e522eec6
1 changed files with 6 additions and 1 deletions

View File

@ -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 );
}