Skip to content

Commit

Permalink
don't publish unknown crypto type to Java floodfill again
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Nov 17, 2017
1 parent 1ba1fa3 commit 5109d40
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions libi2pd/Destination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,22 @@ namespace client
{
if (m_PublishReplyToken)
{
LogPrint (eLogWarning, "Destination: Publish confirmation was not received in ", PUBLISH_CONFIRMATION_TIMEOUT, " seconds, will try again");
m_PublishReplyToken = 0;
Publish ();
if (GetIdentity ()->GetCryptoKeyType () == i2p::data::CRYPTO_KEY_TYPE_ELGAMAL)
{
LogPrint (eLogWarning, "Destination: Publish confirmation was not received in ", PUBLISH_CONFIRMATION_TIMEOUT, " seconds, will try again");
Publish ();
}
else
{
LogPrint (eLogWarning, "Destination: Publish confirmation was not received in ", PUBLISH_CONFIRMATION_TIMEOUT, " seconds from Java floodfill for crypto type ", (int)GetIdentity ()->GetCryptoKeyType ());
// Java floodfill never sends confirmantion back for unknown crypto type
// assume it successive and try to verify
m_PublishVerificationTimer.expires_from_now (boost::posix_time::seconds(PUBLISH_VERIFICATION_TIMEOUT));
m_PublishVerificationTimer.async_wait (std::bind (&LeaseSetDestination::HandlePublishVerificationTimer,
shared_from_this (), std::placeholders::_1));

}
}
}
}
Expand Down

0 comments on commit 5109d40

Please sign in to comment.