]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/socket.cpp
[ 1509599 ] 'Split pickers page in widgets sample' with more icons and rebaking.
[wxWidgets.git] / src / common / socket.cpp
index 65eb47d40406064d1d892d83c4bf67cacd475bdd..11d97cccc433cba57f797ac6e210cf7ed3179f2e 100644 (file)
     #include "wx/object.h"
     #include "wx/string.h"
     #include "wx/intl.h"
+    #include "wx/log.h"
+    #include "wx/event.h"
+    #include "wx/app.h"
+    #include "wx/utils.h"
+    #include "wx/timer.h"
 #endif
 
-#include "wx/app.h"
 #include "wx/apptrait.h"
-#include "wx/timer.h"
-#include "wx/utils.h"
 #include "wx/module.h"
-#include "wx/log.h"
-#include "wx/event.h"
 
 #include "wx/sckaddr.h"
 #include "wx/datetime.h"
@@ -330,11 +330,9 @@ wxUint32 wxSocketBase::_Read(void* buffer, wxUint32 nbytes)
 
   // Return now in one of the following cases:
   // - the socket is invalid,
-  // - we got all the data,
-  // - we got *some* data and we are not using wxSOCKET_WAITALL.
+  // - we got all the data
   if ( !m_socket ||
-       !nbytes ||
-       ((total != 0) && !(m_flags & wxSOCKET_WAITALL)) )
+       !nbytes )
     return total;
 
   // Possible combinations (they are checked in this order)