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
This commit is contained in:
@@ -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.
|
* socket only if errno does _not_ indicate that there may be more data to read.
|
||||||
*/
|
*/
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
|
{
|
||||||
m_error = GSOCK_IOERR;
|
m_error = GSOCK_IOERR;
|
||||||
|
m_detected = GSOCK_LOST_FLAG;
|
||||||
|
Close();
|
||||||
|
// Signal an error for return
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
else if (ret == -1)
|
else if (ret == -1)
|
||||||
{
|
{
|
||||||
if ((errno == EWOULDBLOCK) || (errno == EAGAIN))
|
if ((errno == EWOULDBLOCK) || (errno == EAGAIN))
|
||||||
|
|||||||
Reference in New Issue
Block a user