mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-08 22:32:34 -04:00
increased responsivness of distant chat by forcing tunnel re-digging when no activity is detected. WARNING: the new timestamps make the communication break will peers not up to date, since they will not send keep alive packets on the same delay basis.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8023 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
553240cda9
commit
67c5ef9c8a
3 changed files with 38 additions and 73 deletions
|
@ -359,7 +359,7 @@ void p3turtle::manageTunnels()
|
|||
// digg new tunnels if no tunnels are available and force digg new tunnels at regular (large) interval
|
||||
//
|
||||
for(std::map<TurtleFileHash,TurtleHashInfo>::const_iterator it(_incoming_file_hashes.begin());it!=_incoming_file_hashes.end();++it)
|
||||
{
|
||||
{
|
||||
// get total tunnel speed.
|
||||
//
|
||||
uint32_t total_speed = 0 ;
|
||||
|
@ -541,6 +541,21 @@ void p3turtle::autoWash()
|
|||
}
|
||||
}
|
||||
|
||||
void p3turtle::forceReDiggTunnels(const TurtleFileHash& hash)
|
||||
{
|
||||
{
|
||||
RsStackMutex stack(mTurtleMtx); /********** STACK LOCKED MTX ******/
|
||||
|
||||
if( _incoming_file_hashes.find(hash) == _incoming_file_hashes.end())
|
||||
{
|
||||
std::cerr << "(EE) p3turtle::forceReDiggTunnels(): hash " << hash << " is not currently handled by turtle." << std::endl;
|
||||
return ;
|
||||
}
|
||||
}
|
||||
|
||||
diggTunnel(hash) ;
|
||||
}
|
||||
|
||||
void p3turtle::locked_closeTunnel(TurtleTunnelId tid,std::vector<std::pair<RsTurtleClientService*,std::pair<TurtleFileHash,TurtleVirtualPeerId> > >& sources_to_remove)
|
||||
{
|
||||
// This is closing a given tunnel, removing it from file sources, and from the list of tunnels of its
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue