From 41090dfe3756396a8b4496f732ab8493aa51fe6c Mon Sep 17 00:00:00 2001 From: upstream svn Date: Thu, 8 Dec 2011 22:16:24 +0000 Subject: [PATCH] First check our bool variable. Then make some calculations if it's false. Not the other way round. --- .svn-revision | 2 +- src/ListenSocket.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.svn-revision b/.svn-revision index 9ddd5f71..9e6706bc 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -10690 +10691 diff --git a/src/ListenSocket.cpp b/src/ListenSocket.cpp index 913c2b95..e7bb4a58 100644 --- a/src/ListenSocket.cpp +++ b/src/ListenSocket.cpp @@ -228,7 +228,8 @@ void CListenSocket::KillAllSockets() bool CListenSocket::TooManySockets(bool bIgnoreInterval) { - if (GetOpenSockets() > thePrefs::GetMaxConnections() || (m_OpenSocketsInterval > (thePrefs::GetMaxConperFive()*GetMaxConperFiveModifier()) && !bIgnoreInterval)) { + if (GetOpenSockets() > thePrefs::GetMaxConnections() + || (!bIgnoreInterval && m_OpenSocketsInterval > (thePrefs::GetMaxConperFive() * GetMaxConperFiveModifier()))) { return true; } else { return false; -- 2.11.4.GIT