Removed timeout of waiting tokens in TokenQueue (gui) and increased timeout of requests in libretroshare from 30 seconds to 2 minutes.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7873 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2015-01-25 12:29:33 +00:00
parent 7c850aaa02
commit f02948c54c
2 changed files with 13 additions and 12 deletions

View File

@ -709,7 +709,7 @@ GxsRequest* RsGxsDataAccess::locked_retrieveRequest(const uint32_t& token)
return req; return req;
} }
#define MAX_REQUEST_AGE 30 #define MAX_REQUEST_AGE 120 // 2 minutes
void RsGxsDataAccess::processRequests() void RsGxsDataAccess::processRequests()
{ {

View File

@ -136,19 +136,20 @@ void TokenQueue::pollRequests()
else else
{ {
#define MAX_REQUEST_AGE 30 // checkForRequest returns also true when the request cannot be found (e.g. removed by a timeout)
//#define MAX_REQUEST_AGE 30
/* drop old requests too */ // /* drop old requests too */
if (time(NULL) - req.mRequestTs.tv_sec < MAX_REQUEST_AGE) // if (time(NULL) - req.mRequestTs.tv_sec < MAX_REQUEST_AGE)
{ // {
mRequests.push_back(req); mRequests.push_back(req);
} // }
else // else
{ // {
std::cerr << "TokenQueue::loadRequest(): "; // std::cerr << "TokenQueue::loadRequest(): ";
std::cerr << "Dropping old Token: " << req.mToken << " Type: " << req.mType; // std::cerr << "Dropping old Token: " << req.mToken << " Type: " << req.mType;
std::cerr << std::endl; // std::cerr << std::endl;
} // }
} }
if (mRequests.size() > 0) if (mRequests.size() > 0)