]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fixed a rare infinite loop in InspSocket::FlushWriteBuffer() - this could only affect...
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 13 Sep 2007 11:54:24 +0000 (11:54 +0000)
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 13 Sep 2007 11:54:24 +0000 (11:54 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8031 e03df62e-2008-0410-955e-edbf42e46eb7

src/inspsocket.cpp

index fb0b207b626863cffab1c91587eaedb51be4cfcf..98c9d3baa54a3e8bcea7ef066da8a6707a5b7ff7 100644 (file)
@@ -500,6 +500,12 @@ bool InspSocket::FlushWriteBuffer()
                                                errno = EAGAIN;
                                        }
                                }
+                               else if (result == 0)
+                               {
+                                       this->Instance->SE->DelFd(this);
+                                       this->Close();
+                                       return true;
+                               }
                                else if ((result == -1) && (errno != EAGAIN))
                                {
                                        this->OnError(I_ERR_WRITE);