mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-16 09:57:19 -05:00
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:
parent
7c850aaa02
commit
f02948c54c
@ -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()
|
||||||
{
|
{
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user