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;
}
#define MAX_REQUEST_AGE 30
#define MAX_REQUEST_AGE 120 // 2 minutes
void RsGxsDataAccess::processRequests()
{

View File

@ -136,19 +136,20 @@ void TokenQueue::pollRequests()
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 */
if (time(NULL) - req.mRequestTs.tv_sec < MAX_REQUEST_AGE)
{
// /* drop old requests too */
// if (time(NULL) - req.mRequestTs.tv_sec < MAX_REQUEST_AGE)
// {
mRequests.push_back(req);
}
else
{
std::cerr << "TokenQueue::loadRequest(): ";
std::cerr << "Dropping old Token: " << req.mToken << " Type: " << req.mType;
std::cerr << std::endl;
}
// }
// else
// {
// std::cerr << "TokenQueue::loadRequest(): ";
// std::cerr << "Dropping old Token: " << req.mToken << " Type: " << req.mType;
// std::cerr << std::endl;
// }
}
if (mRequests.size() > 0)