generate disconnection event if recv() returns 0 in Detected_Read() (patch 1730589) [backport from HEAD]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1751,6 +1751,12 @@ void GSocket::Detected_Read()
|
||||
{
|
||||
CALL_CALLBACK(this, GSOCK_CONNECTION);
|
||||
}
|
||||
else if (num == 0)
|
||||
{
|
||||
/* graceful shutdown */
|
||||
CALL_CALLBACK(this, GSOCK_LOST);
|
||||
Shutdown();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Do not throw a lost event in cases where the socket isn't really lost */
|
||||
|
Reference in New Issue
Block a user