diff --git a/Source/IO/IPC/AuIPCPipe.NT.cpp b/Source/IO/IPC/AuIPCPipe.NT.cpp index 776490a9..fd4785d6 100644 --- a/Source/IO/IPC/AuIPCPipe.NT.cpp +++ b/Source/IO/IPC/AuIPCPipe.NT.cpp @@ -177,6 +177,10 @@ namespace Aurora::IO::IPC IPCPipeImpl::~IPCPipeImpl() { + if (this->fsHandle_) + { + AuStaticCast(this->fsHandle_)->pIPCPipe = nullptr; + } } AuSPtr IPCPipeImpl::AsReadChannelIsOpen() diff --git a/Source/IO/IPC/AuIPCPipe.Unix.cpp b/Source/IO/IPC/AuIPCPipe.Unix.cpp index b6fb0715..5fd7be6e 100644 --- a/Source/IO/IPC/AuIPCPipe.Unix.cpp +++ b/Source/IO/IPC/AuIPCPipe.Unix.cpp @@ -32,6 +32,11 @@ namespace Aurora::IO::IPC { int fd {-1}; + if (this->fsHandle_) + { + AuStaticCast(this->fsHandle_)->pIPCPipe = nullptr; + } + if (secondary[0] == -1) { this->mutex_->Unlock(); @@ -60,8 +65,8 @@ namespace Aurora::IO::IPC ::close(fd); } - fsHandle_.reset(); - fsStream_.reset(); + this->fsHandle_.reset(); + this->fsStream_.reset(); }