summaryrefslogtreecommitdiffstats
path: root/source/OSSupport
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-10-07 22:19:14 +0200
committerMattes D <github@xoft.cz>2013-10-07 22:19:14 +0200
commite3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346 (patch)
tree47b7c978eb2dfdb3771b1edf907482ade9eb1d34 /source/OSSupport
parentFixed startup timings on server restart. (diff)
parentFixed memory leaks in the HTTP framework (diff)
downloadcuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.tar
cuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.tar.gz
cuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.tar.bz2
cuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.tar.lz
cuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.tar.xz
cuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.tar.zst
cuberite-e3ba3b8f97f8dd2a4e6dc7ec17f61a2d576fe346.zip
Diffstat (limited to 'source/OSSupport')
-rw-r--r--source/OSSupport/ListenThread.cpp5
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)