[*] protocol-stack ticks now check against the buffers error flags to ensure Writes/Reads weren't being silently dropped in user code

This commit is contained in:
Reece Wilson 2023-04-19 23:46:56 +01:00
parent 2af2eadfa8
commit d7d514c6b7

View File

@ -467,6 +467,14 @@ namespace Aurora::IO::Protocol
auto pOldHead = pNextStream ? pNextStream->readPtr : nullptr;
if (pRead)
{
if (pRead->flagReadError)
{
return false;
}
}
if (!pCurrent->pInterceptorEx->OnDataAvailable(pRead, pNextStream))
{
if (pNextStream)
@ -499,6 +507,14 @@ namespace Aurora::IO::Protocol
bTryAgain = pRead->RemainingBytes();
bTryAgainAtleastOnce |= bTryAgain;
}
if (pCurrent->outputBuffer)
{
if (pCurrent->outputBuffer.flagWriteError)
{
return false;
}
}
}
while (bTryAgain);