mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
check for pending LeaseSet request
This commit is contained in:
parent
1bbb86d304
commit
c61ed150b7
|
@ -464,7 +464,9 @@ namespace client
|
|||
{
|
||||
LeaseSetRequest * request = new LeaseSetRequest (m_Service);
|
||||
request->requestComplete = requestComplete;
|
||||
m_LeaseSetRequests[dest] = request;
|
||||
auto ret = m_LeaseSetRequests.insert (std::pair<i2p::data::IdentHash, LeaseSetRequest *>(dest,request));
|
||||
if (ret.second) // inserted
|
||||
{
|
||||
if (!SendLeaseSetRequest (dest, floodfill, request))
|
||||
{
|
||||
// request failed
|
||||
|
@ -473,6 +475,14 @@ namespace client
|
|||
m_LeaseSetRequests.erase (dest);
|
||||
}
|
||||
}
|
||||
else // duplicate
|
||||
{
|
||||
LogPrint (eLogError, "Request of ", dest.ToBase64 (), " is pending already");
|
||||
// TODO: queue up requests
|
||||
if (request->requestComplete) request->requestComplete (false);
|
||||
delete request;
|
||||
}
|
||||
}
|
||||
else
|
||||
LogPrint (eLogError, "No floodfills found");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue