1
0

SocketThreads: Fixed sending to closed socket.

This commit is contained in:
madmaxoft 2014-02-03 10:38:25 +01:00
parent c2c1639af8
commit 0b384198e5

View File

@ -557,6 +557,11 @@ void cSocketThreads::cSocketThread::WriteToSockets(fd_set * a_Write)
} }
} // if (outgoing data is empty) } // if (outgoing data is empty)
if (m_Slots[i].m_State == sSlot::ssRemoteClosed)
{
continue;
}
if (!SendDataThroughSocket(m_Slots[i].m_Socket, m_Slots[i].m_Outgoing)) if (!SendDataThroughSocket(m_Slots[i].m_Socket, m_Slots[i].m_Outgoing))
{ {
int Err = cSocket::GetLastError(); int Err = cSocket::GetLastError();
@ -566,7 +571,7 @@ void cSocketThreads::cSocketThread::WriteToSockets(fd_set * a_Write)
{ {
m_Slots[i].m_Client->SocketClosed(); m_Slots[i].m_Client->SocketClosed();
} }
return; continue;
} }
if (m_Slots[i].m_Outgoing.empty() && (m_Slots[i].m_State == sSlot::ssWritingRestOut)) if (m_Slots[i].m_Outgoing.empty() && (m_Slots[i].m_State == sSlot::ssWritingRestOut))