prevent division by zero
authorfsb4000 <fsb4000@yandex.ru>
Thu, 1 Jan 2015 04:33:03 +0000 (10:33 +0600)
committerfsb4000 <fsb4000@yandex.ru>
Thu, 1 Jan 2015 04:33:03 +0000 (10:33 +0600)
src/net.cpp

index 9025b9c..2fa43a6 100644 (file)
@@ -1478,6 +1478,8 @@ void ThreadOpenAddedConnections2(void* parg)
         }
         BOOST_FOREACH(vector<CService>& vserv, lservAddressesToAdd)
         {
+            if (vserv.size() == 0)
+                continue;
             CSemaphoreGrant grant(*semOutbound);
             OpenNetworkConnection(CAddress(vserv[i % vserv.size()]), &grant);
             Sleep(500);