mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 11:04:00 +01:00
* prevent zero-division exception when running offline
This commit is contained in:
parent
a3c6ed4dd2
commit
daaba1dbc0
|
@ -126,6 +126,11 @@ namespace data
|
||||||
if (ts - lastExploratory >= 30) // exploratory every 30 seconds
|
if (ts - lastExploratory >= 30) // exploratory every 30 seconds
|
||||||
{
|
{
|
||||||
auto numRouters = m_RouterInfos.size ();
|
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)
|
if (numRouters < 2500 || ts - lastExploratory >= 90)
|
||||||
{
|
{
|
||||||
numRouters = 800/numRouters;
|
numRouters = 800/numRouters;
|
||||||
|
|
Loading…
Reference in a new issue