mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 07:59:35 -05:00
released timing constraint a little bit for distant chat (last setting would make it unstable)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8041 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
13b964d0f5
commit
5fc269bcff
@ -77,19 +77,22 @@ void DistantChatService::flush()
|
||||
|
||||
for(std::map<RsGxsId,DistantChatPeerInfo>::iterator it(_distant_chat_contacts.begin());it!=_distant_chat_contacts.end();++it)
|
||||
{
|
||||
if(it->second.last_contact+8+DISTANT_CHAT_KEEP_ALIVE_TIMEOUT < now && it->second.status == RS_DISTANT_CHAT_STATUS_CAN_TALK)
|
||||
{
|
||||
std::cerr << "(II) DistantChatService:: connexion interrupted with peer." << std::endl;
|
||||
it->second.status = RS_DISTANT_CHAT_STATUS_TUNNEL_DN ;
|
||||
it->second.virtual_peer_id.clear() ;
|
||||
if(it->second.last_contact+20+DISTANT_CHAT_KEEP_ALIVE_TIMEOUT < now && it->second.status == RS_DISTANT_CHAT_STATUS_CAN_TALK)
|
||||
{
|
||||
std::cerr << "(II) DistantChatService:: connexion interrupted with peer." << std::endl;
|
||||
it->second.status = RS_DISTANT_CHAT_STATUS_TUNNEL_DN ;
|
||||
it->second.virtual_peer_id.clear() ;
|
||||
|
||||
// Also reset turtle router monitoring so as to make the tunnel handling more responsive. If we don't do that,
|
||||
// the TR will wait 60 secs for the tunnel to die, which causes a significant waiting time in the chat window.
|
||||
// Also reset turtle router monitoring so as to make the tunnel handling more responsive. If we don't do that,
|
||||
// the TR will wait 60 secs for the tunnel to die, which causes a significant waiting time in the chat window.
|
||||
|
||||
std::cerr << "(II) DistantChatService:: forcing new tunnel campain." << std::endl;
|
||||
if(it->second.direction == RsTurtleGenericTunnelItem::DIRECTION_SERVER)
|
||||
{
|
||||
std::cerr << "(II) DistantChatService:: forcing new tunnel campain." << std::endl;
|
||||
|
||||
mTurtle->forceReDiggTunnels( hashFromGxsId(it->first) );
|
||||
}
|
||||
mTurtle->forceReDiggTunnels( hashFromGxsId(it->first) );
|
||||
}
|
||||
}
|
||||
if(it->second.last_keep_alive_sent + DISTANT_CHAT_KEEP_ALIVE_TIMEOUT < now && it->second.status == RS_DISTANT_CHAT_STATUS_CAN_TALK)
|
||||
{
|
||||
RsChatStatusItem *cs = new RsChatStatusItem ;
|
||||
|
Loading…
Reference in New Issue
Block a user