don't call DoWrite() if we have nothing to send (not nothing to receive)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0f359e5ccf
commit
7ea70b6f0f
@ -688,17 +688,17 @@ void EventWorker::OnSocketEvent(wxSocketEvent& pEvent)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case wxSOCKET_OUTPUT:
|
case wxSOCKET_OUTPUT:
|
||||||
if (m_inbuf != NULL)
|
if ( m_outbuf )
|
||||||
DoWrite();
|
DoWrite();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxSOCKET_CONNECTION:
|
case wxSOCKET_CONNECTION:
|
||||||
LogWorker(wxString::Format("Unexpected wxSOCKET_CONNECTION in EventWorker"),wxLOG_Error);
|
LogWorker("Unexpected wxSOCKET_CONNECTION in EventWorker", wxLOG_Error);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxSOCKET_LOST:
|
case wxSOCKET_LOST:
|
||||||
{
|
{
|
||||||
LogWorker(wxString::Format("Connection lost"));
|
LogWorker("Connection lost");
|
||||||
WorkerEvent e(this);
|
WorkerEvent e(this);
|
||||||
e.m_workerFailed = m_written != m_size;
|
e.m_workerFailed = m_written != m_size;
|
||||||
wxGetApp().AddPendingEvent(e);
|
wxGetApp().AddPendingEvent(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user