diff --git a/Source/IO/Net/AuNetSocket.cpp b/Source/IO/Net/AuNetSocket.cpp index fd5c394c..a537a5a3 100644 --- a/Source/IO/Net/AuNetSocket.cpp +++ b/Source/IO/Net/AuNetSocket.cpp @@ -456,6 +456,11 @@ namespace Aurora::IO::Net { 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_; diff --git a/Source/IO/Net/AuNetSocketChannelOutput.hpp b/Source/IO/Net/AuNetSocketChannelOutput.hpp index ff754b86..f684478f 100644 --- a/Source/IO/Net/AuNetSocketChannelOutput.hpp +++ b/Source/IO/Net/AuNetSocketChannelOutput.hpp @@ -39,6 +39,7 @@ namespace Aurora::IO::Net bool CanResize(); private: + friend struct SocketBase; SocketBase * pParent_; AuSPtr pNetWriteTransaction_; void * pOutSendPointer_ {};