1
0

cListenThread: Fixed thread termination.

This commit is contained in:
madmaxoft 2013-10-06 16:18:15 +02:00
parent d147935853
commit 4bf596a586

View File

@ -224,7 +224,10 @@ void cListenThread::Execute(void)
if (itr->IsValid() && FD_ISSET(itr->GetSocket(), &fdRead)) if (itr->IsValid() && FD_ISSET(itr->GetSocket(), &fdRead))
{ {
cSocket Client = (m_Family == cSocket::IPv4) ? itr->AcceptIPv4() : itr->AcceptIPv6(); cSocket Client = (m_Family == cSocket::IPv4) ? itr->AcceptIPv4() : itr->AcceptIPv6();
m_Callback.OnConnectionAccepted(Client); if (Client.IsValid())
{
m_Callback.OnConnectionAccepted(Client);
}
} }
} // for itr - m_Sockets[] } // for itr - m_Sockets[]
} // while (!m_ShouldTerminate) } // while (!m_ShouldTerminate)