Commit 38eb243b authored by Uwe Bonnes's avatar Uwe Bonnes Committed by Alexandre Julliard

Wait for the object multiple times until TIMEOUT is met.

parent 630c6ea6
...@@ -535,7 +535,11 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent, ...@@ -535,7 +535,11 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
} }
if (flags & FD_FLAG_TIMEOUT) if (flags & FD_FLAG_TIMEOUT)
{ {
do
{
ret = NtWaitForSingleObject(hEvent, TRUE, NULL); ret = NtWaitForSingleObject(hEvent, TRUE, NULL);
}
while (ret == STATUS_USER_APC && io_status->u.Status == STATUS_PENDING);
NtClose(hEvent); NtClose(hEvent);
if (ret != STATUS_USER_APC) if (ret != STATUS_USER_APC)
fileio->queue_apc_on_error = 1; fileio->queue_apc_on_error = 1;
...@@ -748,7 +752,11 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent, ...@@ -748,7 +752,11 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
} }
if (flags & FD_FLAG_TIMEOUT) if (flags & FD_FLAG_TIMEOUT)
{ {
do
{
ret = NtWaitForSingleObject(hEvent, TRUE, NULL); ret = NtWaitForSingleObject(hEvent, TRUE, NULL);
}
while (ret == STATUS_USER_APC && io_status->u.Status == STATUS_PENDING);
NtClose(hEvent); NtClose(hEvent);
if (ret != STATUS_USER_APC) if (ret != STATUS_USER_APC)
fileio->queue_apc_on_error = 1; fileio->queue_apc_on_error = 1;
......
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