[jdev] Presence - how often?

Yann Leboulanger asterix at lagaule.org
Thu Dec 11 08:17:21 CST 2008


Jonathan Schleifer a écrit :
> Am 11.12.2008 um 13:52 schrieb Yann Leboulanger:
> 
>> In this case it's useless, as it's more or less the TCP timeout ...
> 
> Nope, the TCP timeout is not the problem. If a TCP/IP packet gets into a 
> timeout, it is resent. When I disable the pings, the connection doesn't 
> get killed, it's slow, but it works. The problem is that when signing in 
> I receive the roster, the initial presences etc., so that the ping can't 
> be answered in time. Actually, ssh shows just how nice TCP/IP works: I 
> can have no net for a few minutes, then have it again and my SSH session 
> is still alive. So the the problem is the timeout in Gajim, and 
> disabling it helps, as Dave already said. But disabling it is not always 
> the best solution, because then you also won't notice when the 
> connection is really dead.

if it's the behaviour you want, just disable keppalive packets. In Gajim 
it's not what we want. Because in your case if connection is really 
brocken, it takes about 10minutes to be detected. TCP tries to re-send 
packets during about 10-15 minutes, then it tells higher level layer 
that conenction is brocken. In Gajim we want to be aware that connection 
is brocken before 15 minutes.



More information about the JDev mailing list