diff options
-rw-r--r-- | source/cSocketThreads.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/cSocketThreads.cpp b/source/cSocketThreads.cpp index b27523972..594d5a7d7 100644 --- a/source/cSocketThreads.cpp +++ b/source/cSocketThreads.cpp @@ -640,7 +640,8 @@ void cSocketThreads::cSocketThread::WriteToSockets(fd_set * a_Write) cCSLock Lock(m_Parent->m_CS); for (int i = m_NumSlots - 1; i >= 0; --i) { - if (!FD_ISSET(m_Slots[i].m_Socket->GetSocket(), a_Write)) + cSocket Socket(*(m_Slots[i].m_Socket)); + if (!Socket.IsValid() || !FD_ISSET(Socket.GetSocket(), a_Write)) { continue; } |