Browse Source

Merge pull request #904 from l-n-s/fix_netdb_thread

NetDb: If NetDb is empty, throw exception instead of killing NetDb thread
pull/906/head
orignal 7 years ago committed by GitHub
parent
commit
68166c22b3
  1. 4
      libi2pd/NetDb.cpp

4
libi2pd/NetDb.cpp

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
#include <fstream>
#include <vector>
#include <boost/asio.hpp>
#include <stdexcept>
#include "I2PEndian.h"
#include "Base.h"
@ -139,8 +140,7 @@ namespace data @@ -139,8 +140,7 @@ namespace data
auto numRouters = m_RouterInfos.size ();
if (numRouters == 0)
{
LogPrint(eLogError, "NetDb: no known routers, reseed seems to be totally failed");
break;
throw std::runtime_error("No known routers, reseed seems to be totally failed");
}
else // we have peers now
m_FloodfillBootstrap = nullptr;

Loading…
Cancel
Save