From: Angel Vidal Veiga Date: Sun, 6 Aug 2006 04:46:57 +0000 (+0000) Subject: Backporting from my SoC branch, fix for remotely closed sockets firing input events... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/98e7a7f97f0dd6f02903af7c154777bd5523576f Backporting from my SoC branch, fix for remotely closed sockets firing input events till destroyed or closed locally. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/unix/gsocket.cpp b/src/unix/gsocket.cpp index 97eeb0153b..0b255fb182 100644 --- a/src/unix/gsocket.cpp +++ b/src/unix/gsocket.cpp @@ -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))