From edd9dd2c39b12d1b85d75efaae0cf3eed0159e66 Mon Sep 17 00:00:00 2001 From: orignal Date: Sat, 2 Mar 2024 10:57:01 -0500 Subject: [PATCH] try to publish again after 5 seconds if destination is not ready --- libi2pd/Destination.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libi2pd/Destination.cpp b/libi2pd/Destination.cpp index 35bad171..d28221d1 100644 --- a/libi2pd/Destination.cpp +++ b/libi2pd/Destination.cpp @@ -621,7 +621,14 @@ namespace client LogPrint (eLogError, "Destination: Can't publish LeaseSet, no more floodfills found"); if (!floodfill || !outbound || !inbound) { + // we can't publish now m_ExcludedFloodfills.clear (); + m_PublishReplyToken = 1; // dummy non-zero value + // try again after a while + LogPrint (eLogInfo, "Destination: Try publishing again after ", PUBLISH_CONFIRMATION_TIMEOUT, " seconds"); + m_PublishConfirmationTimer.expires_from_now (boost::posix_time::seconds(PUBLISH_CONFIRMATION_TIMEOUT)); + m_PublishConfirmationTimer.async_wait (std::bind (&LeaseSetDestination::HandlePublishConfirmationTimer, + shared_from_this (), std::placeholders::_1)); return; } }