mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-13 03:22:34 -04:00
small fix to upload transfer rates
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1017 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
99959b261f
commit
896fc45a22
2 changed files with 32 additions and 23 deletions
|
@ -193,8 +193,11 @@ void ftServer::run()
|
|||
{
|
||||
if (FileDetails(sit->first,RS_FILE_HINTS_UPLOAD,info))
|
||||
{
|
||||
if ((now - info.lastTS) > 5)
|
||||
if ((now - info.lastTS) > 10)
|
||||
{
|
||||
#ifdef SERVER_DEBUG
|
||||
std::cout << "info.lastTS = " << info.lastTS << ", now=" << now << std::endl ;
|
||||
#endif
|
||||
toDels.push_back(sit->first);
|
||||
}
|
||||
}
|
||||
|
@ -204,8 +207,12 @@ void ftServer::run()
|
|||
for (it = toDels.begin();it != toDels.end(); it++)
|
||||
{
|
||||
sit = mFtDataplex->mServers.find(*it);
|
||||
delete sit->second;
|
||||
mFtDataplex->mServers.erase(sit);
|
||||
|
||||
if(mFtDataplex->mServers.end() != sit)
|
||||
{
|
||||
delete sit->second;
|
||||
mFtDataplex->mServers.erase(sit);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
|
@ -229,6 +236,7 @@ void ftServer::run()
|
|||
bool ftServer::FileRequest(std::string fname, std::string hash, uint64_t size,
|
||||
std::string dest, uint32_t flags, std::list<std::string> srcIds)
|
||||
{
|
||||
std::cerr << "Requesting " << fname << std::endl ;
|
||||
return mFtController->FileRequest(fname, hash, size,
|
||||
dest, flags, srcIds);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue