Browse Source

* prevent zero-division exception when running offline

pull/317/head
hagen 9 years ago
parent
commit
daaba1dbc0
  1. 5
      NetDb.cpp

5
NetDb.cpp

@ -126,6 +126,11 @@ namespace data @@ -126,6 +126,11 @@ namespace data
if (ts - lastExploratory >= 30) // exploratory every 30 seconds
{
auto numRouters = m_RouterInfos.size ();
if (numRouters == 0)
{
LogPrint(eLogError, "NetDb: no known routers, reseed seems to be totally failed");
break;
}
if (numRouters < 2500 || ts - lastExploratory >= 90)
{
numRouters = 800/numRouters;

Loading…
Cancel
Save