]> git.saurik.com Git - wxWidgets.git/commitdiff
Backporting from my SoC branch, fix for remotely closed sockets firing input events...
authorAngel Vidal Veiga <cafedetal@gmail.com>
Sun, 6 Aug 2006 04:46:57 +0000 (04:46 +0000)
committerAngel Vidal Veiga <cafedetal@gmail.com>
Sun, 6 Aug 2006 04:46:57 +0000 (04:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/gsocket.cpp

index 97eeb0153b226d762a844b85c11b3fb9f05b2aa7..0b255fb1829d9807aaa625de2159f16dfca2abc0 100644 (file)
@@ -1084,7 +1084,13 @@ int GSocket::Read(char *buffer, int size)
      * socket only if errno does _not_ indicate that there may be more data to read.
      */
     if (ret == 0)
+    {
       m_error = GSOCK_IOERR;
+      m_detected = GSOCK_LOST_FLAG;
+      Close();
+      // Signal an error for return
+      return -1;
+    }
     else if (ret == -1)
     {
       if ((errno == EWOULDBLOCK) || (errno == EAGAIN))