1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Fixed async read error code handling

This commit is contained in:
Brian Fiete 2025-05-11 08:11:17 +02:00
parent 109ad9fc78
commit cd038089a7

View file

@ -677,8 +677,10 @@ struct BfpAsyncData
return -2; // Still executing
}
if (mOverlappedResult.mErrorCode != 0)
if ((mOverlappedResult.mErrorCode != 0) && (mOverlappedResult.mBytesRead == 0))
{
mOverlappedResult.mData.Clear();
errorCode = mOverlappedResult.mErrorCode;
return -1;
}