diff options
author | madmaxoft <github@xoft.cz> | 2013-10-06 16:18:15 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-10-06 16:18:15 +0200 |
commit | 4bf596a586687de8e4abbc62afa6a7c51cdc311c (patch) | |
tree | 2ef418752388e95cd60832e07d3e8430afcd0ba9 /source | |
parent | Added proper shutdown to HTTPServer. (diff) | |
download | cuberite-4bf596a586687de8e4abbc62afa6a7c51cdc311c.tar cuberite-4bf596a586687de8e4abbc62afa6a7c51cdc311c.tar.gz cuberite-4bf596a586687de8e4abbc62afa6a7c51cdc311c.tar.bz2 cuberite-4bf596a586687de8e4abbc62afa6a7c51cdc311c.tar.lz cuberite-4bf596a586687de8e4abbc62afa6a7c51cdc311c.tar.xz cuberite-4bf596a586687de8e4abbc62afa6a7c51cdc311c.tar.zst cuberite-4bf596a586687de8e4abbc62afa6a7c51cdc311c.zip |
Diffstat (limited to 'source')
-rw-r--r-- | source/OSSupport/ListenThread.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/OSSupport/ListenThread.cpp b/source/OSSupport/ListenThread.cpp index 0890aabc8..ba3198764 100644 --- a/source/OSSupport/ListenThread.cpp +++ b/source/OSSupport/ListenThread.cpp @@ -224,7 +224,10 @@ void cListenThread::Execute(void) if (itr->IsValid() && FD_ISSET(itr->GetSocket(), &fdRead)) { 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[] } // while (!m_ShouldTerminate) |