merged GetOverlappedIO fix from RC_0_16

This commit is contained in:
Arvid Norberg 2013-01-25 05:53:17 +00:00
parent 314d249c3c
commit 3d66e53ae3
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,7 @@
* fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP
* add work-around for bug in windows vista and earlier in GetOverlappedResult
* fix traversal algorithm leak in DHT
* fix string encoding conversions on windows
* take torrent_handle::query_pieces into account in torrent_handle::statue()

View File

@ -1583,8 +1583,9 @@ namespace libtorrent
CloseHandle(ol.hEvent);
return -1;
}
WaitForSingleObject(ol.hEvent, INFINITE);
DWORD num_written;
if (GetOverlappedResult(m_file_handle, &ol, &num_written, true) == 0)
if (GetOverlappedResult(m_file_handle, &ol, &num_written, false) == 0)
{
DWORD last_error = GetLastError();
#ifndef TORRENT_MINGW