mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-22 19:41:41 +00:00
remote LeaseSets per local destination
This commit is contained in:
1 parent
22937e1b54
commit
eff0e13f31
7 files changed
+77
-15
No files matched your search
+2
-2
@@ -850,12 +850,12 @@ namespace util
|
||||
|
||||
void HTTPConnection::SendToDestination (const i2p::data::IdentHash& destination, const char * buf, size_t len)
|
||||
{
|
||||
auto leaseSet = i2p::data::netdb.FindLeaseSet (destination);
|
||||
auto leaseSet = i2p::stream::GetSharedLocalDestination ()->FindLeaseSet (destination);
|
||||
if (!leaseSet || !leaseSet->HasNonExpiredLeases ())
|
||||
{
|
||||
i2p::data::netdb.Subscribe(destination, i2p::stream::GetSharedLocalDestination ()->GetTunnelPool ());
|
||||
std::this_thread::sleep_for (std::chrono::seconds(10)); // wait for 10 seconds
|
||||
leaseSet = i2p::data::netdb.FindLeaseSet (destination);
|
||||
leaseSet = i2p::stream::GetSharedLocalDestination ()->FindLeaseSet (destination);
|
||||
if (!leaseSet || !leaseSet->HasNonExpiredLeases ()) // still no LeaseSet
|
||||
{
|
||||
SendReply (leaseSet ? "<html>" + itoopieImage + "<br>Leases expired</html>" : "<html>" + itoopieImage + "LeaseSet not found</html>", 504);
|
||||
|
||||
Reference in new issue
Block a user