From 4b9de0777b2355db46ef3c15c4cab6c60ac2c486 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 11 Dec 2016 14:17:09 -0500 Subject: [PATCH] queue up LeaseSet requests --- Destination.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Destination.cpp b/Destination.cpp index 61960464..491a9f29 100644 --- a/Destination.cpp +++ b/Destination.cpp @@ -544,11 +544,14 @@ namespace client else // duplicate { LogPrint (eLogInfo, "Destination: Request of LeaseSet ", dest.ToBase64 (), " is pending already"); - // TODO: implement it properly - //ret.first->second->requestComplete.push_back (requestComplete); if (ts > ret.first->second->requestTime + MAX_LEASESET_REQUEST_TIMEOUT) + { + // something went wrong m_LeaseSetRequests.erase (ret.first); - if (requestComplete) requestComplete (nullptr); + if (requestComplete) requestComplete (nullptr); + } + else if (requestComplete) + ret.first->second->requestComplete.push_back (requestComplete); } } else