]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/socket.cpp
Remove asserts in wxMSW::wxTLW::SetIcons() and always set some icon.
[wxWidgets.git] / src / common / socket.cpp
index 182cf510c6785979656077e04ef40684f872cc77..c0c35df4e2e16bbfcf1e80a2cd0b6496a663a675 100644 (file)
@@ -1372,10 +1372,11 @@ wxSocketBase::DoWait(long timeout, wxSocketEventFlags flags)
 {
     wxCHECK_MSG( m_impl, -1, "can't wait on invalid socket" );
 
-    // we're never going to become ready in a client if we're not connected any
-    // more (OTOH a server can call this to precisely wait for a connection so
-    // do wait for it in this case)
-    if ( !m_impl->IsServer() && !m_connected && !m_establishing )
+    // we're never going to become ready in a TCP client if we're not connected
+    // any more (OTOH a server can call this to precisely wait for a connection
+    // so do wait for it in this case and UDP client is never "connected")
+    if ( !m_impl->IsServer() &&
+            m_impl->m_stream && !m_connected && !m_establishing )
         return -1;
 
     // This can be set to true from Interrupt() to exit this function a.s.a.p.