From 8ff2627e8eef895bc840d335aeca5db947077d79 Mon Sep 17 00:00:00 2001 From: alexandr Date: Mon, 3 Oct 2016 20:06:10 +0500 Subject: [PATCH] minimize count of errors "I2CP: Failed to send message. No outbound tunnels" --- I2CP.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/I2CP.cpp b/I2CP.cpp index e0139b9f..04f21408 100644 --- a/I2CP.cpp +++ b/I2CP.cpp @@ -103,7 +103,8 @@ namespace client } auto path = remoteSession->GetSharedRoutingPath (); std::shared_ptr outboundTunnel; - std::shared_ptr remoteLease; + std::shared_ptr remoteLease; + bool unconfirmedTags=false; if (path) { if (!remoteSession->CleanupUnconfirmedTags ()) // no stuck tags @@ -112,9 +113,12 @@ namespace client remoteLease = path->remoteLease; } else + { remoteSession->SetSharedRoutingPath (nullptr); + unconfirmedTags=true; + } } - else + if (!path || unconfirmedTags) { outboundTunnel = GetTunnelPool ()->GetNextOutboundTunnel (); auto leases = remote->GetNonExpiredLeases ();