]> git.saurik.com Git - wxWidgets.git/commitdiff
set socket state to connected when it receives a connection notification, otherwise...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 2 Jul 2009 16:10:12 +0000 (16:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 2 Jul 2009 16:10:12 +0000 (16:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/socket.cpp

index 3227bdb4292e38b1708db93584aa8f944df89fc7..30c278887a5aeac0e9ee53a0fdf4a5aa0d4f56f3 100644 (file)
@@ -1607,20 +1607,22 @@ void wxSocketBase::OnRequest(wxSocketNotify notification)
 
         case wxSOCKET_CONNECTION:
             flag = wxSOCKET_CONNECTION_FLAG;
+
+            // we're now successfully connected
+            m_connected = true;
             break;
 
         case wxSOCKET_LOST:
             flag = wxSOCKET_LOST_FLAG;
+
+            // if we lost the connection the socket is now closed
+            m_closed = true;
             break;
 
         default:
             wxFAIL_MSG( "unknown wxSocket notification" );
     }
 
-    // if we lost the connection the socket is now closed
-    if ( notification == wxSOCKET_LOST )
-        m_closed = true;
-
     // remember the events which were generated for this socket, we're going to
     // use this in DoWait()
     m_eventsgot |= flag;