merged one more fix for GetOverlappedResult

This commit is contained in:
Arvid Norberg 2013-01-25 05:55:28 +00:00
parent 3d66e53ae3
commit 9ac63f9aba
1 changed files with 2 additions and 1 deletions

View File

@ -1344,8 +1344,9 @@ namespace libtorrent
CloseHandle(ol.hEvent);
return -1;
}
WaitForSingleObject(ol.hEvent, INFINITE);
DWORD num_read;
if (GetOverlappedResult(m_file_handle, &ol, &num_read, true) == 0)
if (GetOverlappedResult(m_file_handle, &ol, &num_read, false) == 0)
{
DWORD last_error = GetLastError();
if (last_error != ERROR_HANDLE_EOF)