From f02948c54cb5bf1204a3db9507ddca437a1c9bce Mon Sep 17 00:00:00 2001 From: thunder2 Date: Sun, 25 Jan 2015 12:29:33 +0000 Subject: [PATCH] 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 --- libretroshare/src/gxs/rsgxsdataaccess.cc | 2 +- retroshare-gui/src/util/TokenQueue.cpp | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/libretroshare/src/gxs/rsgxsdataaccess.cc b/libretroshare/src/gxs/rsgxsdataaccess.cc index f851a497a..4392615bb 100644 --- a/libretroshare/src/gxs/rsgxsdataaccess.cc +++ b/libretroshare/src/gxs/rsgxsdataaccess.cc @@ -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() { diff --git a/retroshare-gui/src/util/TokenQueue.cpp b/retroshare-gui/src/util/TokenQueue.cpp index cb1d2332d..d4cd251bf 100644 --- a/retroshare-gui/src/util/TokenQueue.cpp +++ b/retroshare-gui/src/util/TokenQueue.cpp @@ -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)