mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
* fix segfault when offline (#330)
This commit is contained in:
@@ -666,6 +666,10 @@ namespace tunnel
|
|||||||
{
|
{
|
||||||
// trying to create one more inbound tunnel
|
// trying to create one more inbound tunnel
|
||||||
auto router = i2p::data::netdb.GetRandomRouter ();
|
auto router = i2p::data::netdb.GetRandomRouter ();
|
||||||
|
if (!router) {
|
||||||
|
LogPrint (eLogWarning, "Tunnel: can't find any router, skip creating tunnel");
|
||||||
|
return;
|
||||||
|
}
|
||||||
LogPrint (eLogDebug, "Tunnel: creating one hop inbound tunnel");
|
LogPrint (eLogDebug, "Tunnel: creating one hop inbound tunnel");
|
||||||
CreateTunnel<InboundTunnel> (
|
CreateTunnel<InboundTunnel> (
|
||||||
std::make_shared<TunnelConfig> (std::vector<std::shared_ptr<const i2p::data::IdentityEx> > { router->GetRouterIdentity () })
|
std::make_shared<TunnelConfig> (std::vector<std::shared_ptr<const i2p::data::IdentityEx> > { router->GetRouterIdentity () })
|
||||||
|
|||||||
Reference in New Issue
Block a user