Skip to content

Commit

Permalink
Handle case when GetOverlappedResult() returns with ERROR_MORE_DATA
Browse files Browse the repository at this point in the history
  • Loading branch information
alxchk committed Jan 10, 2020
1 parent 81cffc7 commit 3c57734
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions server/aio.c
Expand Up @@ -110,8 +110,13 @@ int aio_read(
if (rio->pending) {
rio->pending = 0;
if (!GetOverlappedResult(fd, &rio->io, &len, FALSE)) {
ResetEvent(rio->io.hEvent);
return syserror("GetOverlappedResult");
if (GetLastError() == ERROR_MORE_DATA) {
// Not an error
info(0, "GetOverlappedResult: ERROR_MORE_DATA (len=%d)", len);
} else {
ResetEvent(rio->io.hEvent);
return syserror("GetOverlappedResult");
}
}

if (!len) {
Expand Down

0 comments on commit 3c57734

Please sign in to comment.