[*] Fix Win32 pipe regression
[*] Fix Win32 network regression
This commit is contained in:
parent
ff65193d0f
commit
9b1ff8889e
@ -127,19 +127,22 @@ namespace Aurora::IO
|
||||
|
||||
if (this->pAsyncTransaction_)
|
||||
{
|
||||
auto pWaitable = this->pAsyncAdapter_->ToWaitable();
|
||||
if (pWaitable)
|
||||
if (!this->bShouldBypassIOWatch)
|
||||
{
|
||||
ret = this->parent_->parent_->StartIOWatch(pWaitable, AuSharedFromThis());
|
||||
if (!ret)
|
||||
auto pWaitable = this->pAsyncAdapter_->ToWaitable();
|
||||
if (pWaitable)
|
||||
{
|
||||
ret = this->parent_->parent_->StartIOWatch(pWaitable, AuSharedFromThis());
|
||||
if (!ret)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -103,7 +103,8 @@ namespace Aurora::IO
|
||||
|
||||
AuMemoryViewWrite nextWriteAsync_;
|
||||
IOPipeRequest request {};
|
||||
bool bShouldReadNext {false};
|
||||
bool bShouldReadNext { false };
|
||||
bool bShouldBypassIOWatch { false };
|
||||
|
||||
bool IsAtRequestedEnd();
|
||||
AuByteBuffer *GetBuffer();
|
||||
|
@ -598,8 +598,6 @@ namespace Aurora::IO::FS
|
||||
{
|
||||
DWORD read {};
|
||||
|
||||
this->dwLastAbstractStat = 0;
|
||||
|
||||
if (this->isIrredeemable_)
|
||||
{
|
||||
::ResetEvent(this->event);
|
||||
|
@ -99,11 +99,7 @@ namespace Aurora::IO::Net
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pReader->Start())
|
||||
{
|
||||
this->pParent_->SendErrorNoStream({});
|
||||
return;
|
||||
}
|
||||
AuStaticCast<IOPipeWork>(pReader)->bShouldBypassIOWatch = true;
|
||||
|
||||
auto pTX = this->pNetReadTransaction;
|
||||
if (!pTX)
|
||||
@ -112,7 +108,14 @@ namespace Aurora::IO::Net
|
||||
return;
|
||||
}
|
||||
|
||||
pTX->SetCallback(sharedThis);//; AuSPtr<IAsyncFinishedSubscriber>(this->pParent_->SharedFromThis(), this));
|
||||
pTX->SetCallback(sharedThis);
|
||||
|
||||
if (!pReader->Start())
|
||||
{
|
||||
this->pParent_->SendErrorNoStream({});
|
||||
return;
|
||||
}
|
||||
|
||||
IncrementWorker();
|
||||
}
|
||||
|
||||
|
@ -434,7 +434,8 @@ namespace Aurora::IO::Net
|
||||
bool NtAsyncNetworkTransaction::HasCompleted()
|
||||
{
|
||||
return this->bHasFailed ||
|
||||
this->dwLastBytes;
|
||||
this->dwLastBytes ||
|
||||
this->bLatch;
|
||||
}
|
||||
|
||||
AuUInt NtAsyncNetworkTransaction::GetOSErrorCode()
|
||||
@ -461,18 +462,24 @@ namespace Aurora::IO::Net
|
||||
{
|
||||
AuLoop::ILSEvent *optEvent {};
|
||||
|
||||
if (auto pLoopSource = this->pCompletionGroup_->GetTriggerLoopSource())
|
||||
if (auto pCompletionGroup = this->pCompletionGroup_)
|
||||
{
|
||||
return pLoopSource;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (auto pWaitable = this->pWaitable)
|
||||
if (auto pLoopSource = pCompletionGroup->GetTriggerLoopSource())
|
||||
{
|
||||
return pWaitable;
|
||||
return pLoopSource;
|
||||
}
|
||||
}
|
||||
|
||||
if (auto pWaitable = this->pWaitable)
|
||||
{
|
||||
return pWaitable;
|
||||
}
|
||||
|
||||
if (auto pSocket = this->pSocket)
|
||||
{
|
||||
return AuStaticCast<AuLoop::LSEvent>(pSocket->ToWorkerEx()->ToEvent());
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user