diff options
author | Adam <Adam@anope.org> | 2011-11-08 17:29:16 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-11-08 17:29:16 -0500 |
commit | b5ff856f47d8e54d12c568462a06351633c29610 (patch) | |
tree | a4e2f96c59ee49aa5e6cacdfd30db6155151ad36 /src/socketengines/pipeengine_pipe.cpp | |
parent | 97b9055f92f21cd91af44a3d5dacce0024536cff (diff) |
Windows
Diffstat (limited to 'src/socketengines/pipeengine_pipe.cpp')
-rw-r--r-- | src/socketengines/pipeengine_pipe.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/socketengines/pipeengine_pipe.cpp b/src/socketengines/pipeengine_pipe.cpp index f2fa0876a..7901931c8 100644 --- a/src/socketengines/pipeengine_pipe.cpp +++ b/src/socketengines/pipeengine_pipe.cpp @@ -10,7 +10,7 @@ Pipe::Pipe() : Socket(-1), WritePipe(-1) flags = fcntl(fds[1], F_GETFL, 0); fcntl(fds[1], F_SETFL, flags | O_NONBLOCK); - this->~Socket(); + this->~Pipe(); this->Sock = fds[0]; this->WritePipe = fds[1]; @@ -20,13 +20,14 @@ Pipe::Pipe() : Socket(-1), WritePipe(-1) Pipe::~Pipe() { - CloseSocket(this->WritePipe); + if (this->WritePipe >= 0) + close(this->WritePipe); } bool Pipe::ProcessRead() { char dummy[512]; - while (read(this->GetFD(), &dummy, 512) == 512); + while (read(this->GetFD(), dummy, 512) == 512); this->OnNotify(); return true; } @@ -40,4 +41,3 @@ void Pipe::Notify() void Pipe::OnNotify() { } - |