diff options
-rw-r--r-- | source/OSSupport/ListenThread.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/OSSupport/ListenThread.cpp b/source/OSSupport/ListenThread.cpp index 706c820b4..bc14aa0ba 100644 --- a/source/OSSupport/ListenThread.cpp +++ b/source/OSSupport/ListenThread.cpp @@ -215,7 +215,7 @@ void cListenThread::Execute(void) }
for (cSockets::iterator itr = m_Sockets.begin(), end = m_Sockets.end(); itr != end; ++itr)
{
- if (FD_ISSET(itr->GetSocket(), &fdRead))
+ if (itr->IsValid() && FD_ISSET(itr->GetSocket(), &fdRead))
{
cSocket Client = (m_Family == cSocket::IPv4) ? itr->AcceptIPv4() : itr->AcceptIPv6();
m_Callback.OnConnectionAccepted(Client);
|