|
|
@ -658,13 +658,13 @@ namespace client |
|
|
|
if (!leaseSet) |
|
|
|
if (!leaseSet) |
|
|
|
{ |
|
|
|
{ |
|
|
|
std::unique_lock<std::mutex> l(newDataReceivedMutex); |
|
|
|
std::unique_lock<std::mutex> l(newDataReceivedMutex); |
|
|
|
if (i2p::client::context.GetSharedLocalDestination ()->RequestDestination (m_Ident, |
|
|
|
i2p::client::context.GetSharedLocalDestination ()->RequestDestination (m_Ident, |
|
|
|
[&newDataReceived, &leaseSet](std::shared_ptr<i2p::data::LeaseSet> ls) |
|
|
|
[&newDataReceived, &leaseSet, &newDataReceivedMutex](std::shared_ptr<i2p::data::LeaseSet> ls) |
|
|
|
{ |
|
|
|
{ |
|
|
|
leaseSet = ls; |
|
|
|
leaseSet = ls; |
|
|
|
|
|
|
|
std::unique_lock<std::mutex> l1(newDataReceivedMutex); |
|
|
|
newDataReceived.notify_all (); |
|
|
|
newDataReceived.notify_all (); |
|
|
|
})) |
|
|
|
}); |
|
|
|
{ |
|
|
|
|
|
|
|
if (newDataReceived.wait_for (l, std::chrono::seconds (SUBSCRIPTION_REQUEST_TIMEOUT)) == std::cv_status::timeout) |
|
|
|
if (newDataReceived.wait_for (l, std::chrono::seconds (SUBSCRIPTION_REQUEST_TIMEOUT)) == std::cv_status::timeout) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LogPrint (eLogError, "Addressbook: Subscription LeaseSet request timeout expired"); |
|
|
|
LogPrint (eLogError, "Addressbook: Subscription LeaseSet request timeout expired"); |
|
|
@ -672,12 +672,6 @@ namespace client |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
LogPrint (eLogError, "Addressbook: Destination is not ready"); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!leaseSet) { |
|
|
|
if (!leaseSet) { |
|
|
|
/* still no leaseset found */ |
|
|
|
/* still no leaseset found */ |
|
|
|
LogPrint (eLogError, "Addressbook: LeaseSet for address ", url.host, " not found"); |
|
|
|
LogPrint (eLogError, "Addressbook: LeaseSet for address ", url.host, " not found"); |
|
|
|