[*] i dont think this path should ever be hit, but just to be certain, lets check the networks output channel translation object for an error if the socketbase doesnt know of the last fatal error code

This commit is contained in:
Reece Wilson 2023-04-26 20:22:11 +01:00
parent b8540c77a7
commit 4b79aa902b
2 changed files with 6 additions and 0 deletions

View File

@ -456,6 +456,11 @@ namespace Aurora::IO::Net
{ {
NetError_SetOsError(this->error_, this->socketChannel_.inputChannel.pNetReadTransaction->GetOSErrorCode()); NetError_SetOsError(this->error_, this->socketChannel_.inputChannel.pNetReadTransaction->GetOSErrorCode());
} }
else if (this->socketChannel_.outputChannel.pNetWriteTransaction_ &&
this->socketChannel_.outputChannel.pNetWriteTransaction_->Failed())
{
NetError_SetOsError(this->error_, this->socketChannel_.outputChannel.pNetWriteTransaction_->GetOSErrorCode());
}
} }
return this->error_; return this->error_;

View File

@ -39,6 +39,7 @@ namespace Aurora::IO::Net
bool CanResize(); bool CanResize();
private: private:
friend struct SocketBase;
SocketBase * pParent_; SocketBase * pParent_;
AuSPtr<IAsyncTransaction> pNetWriteTransaction_; AuSPtr<IAsyncTransaction> pNetWriteTransaction_;
void * pOutSendPointer_ {}; void * pOutSendPointer_ {};