]> git.saurik.com Git - wxWidgets.git/commitdiff
don't call DoWrite() if we have nothing to send (not nothing to receive)
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 2 Jan 2009 00:04:55 +0000 (00:04 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 2 Jan 2009 00:04:55 +0000 (00:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/sockets/baseserver.cpp

index c74ef2866620fac2a720c81d86a3f2d172cb2e0d..283ecb6b8e1afe653d8f545bd40292e90579f42b 100644 (file)
@@ -688,17 +688,17 @@ void EventWorker::OnSocketEvent(wxSocketEvent& pEvent)
             break;
 
         case wxSOCKET_OUTPUT:
-            if (m_inbuf != NULL)
+            if ( m_outbuf )
                 DoWrite();
             break;
 
         case wxSOCKET_CONNECTION:
-            LogWorker(wxString::Format("Unexpected wxSOCKET_CONNECTION in EventWorker"),wxLOG_Error);
+            LogWorker("Unexpected wxSOCKET_CONNECTION in EventWorker", wxLOG_Error);
             break;
 
         case wxSOCKET_LOST:
             {
-                LogWorker(wxString::Format("Connection lost"));
+                LogWorker("Connection lost");
                 WorkerEvent e(this);
                 e.m_workerFailed = m_written != m_size;
                 wxGetApp().AddPendingEvent(e);