From 06b2b26e39df932ee2e70f66c5b3579704ab90c5 Mon Sep 17 00:00:00 2001 From: Darknet Villain Date: Tue, 11 Jul 2017 02:55:38 -0400 Subject: [PATCH] NetDb: If NetDb is empty, throw exception instead of killing NetDb thread --- libi2pd/NetDb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libi2pd/NetDb.cpp b/libi2pd/NetDb.cpp index 7b6a2c1a..97ef0280 100644 --- a/libi2pd/NetDb.cpp +++ b/libi2pd/NetDb.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include "I2PEndian.h" #include "Base.h" @@ -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;