diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 3227bdb429..30c278887a 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -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;