[kopete-bugs] [Bug 198789] Kopete disconnects after several xmpp ping messages from jabber server

Nicos Gollan gtdev at spearhead.de
Wed Apr 28 10:41:02 CEST 2010


https://bugs.kde.org/show_bug.cgi?id=198789





--- Comment #69 from Nicos Gollan <gtdev spearhead de>  2010-04-28 10:40:25 ---
(In reply to comment #65)
> Just to clear things, most protocols have they own ping packet so they can
> detect when the connection is broken because otherwise the detection would only
> occur when we (Kopete/protocol) send something. So if I simplify it without the
> ping packets and without user interaction the connection could be broken for
> hours and Kopete will not detect it.

Definitely not. TCP will give you pretty decent feedback on broken connections
on all but the most broken networking stacks.

> The SocketTimeoutWatcher does this, when Kopete(protocol) sends something to
> server it check if the server got the packet, to be precise if we got the TCP
> acknowledge packet within 15 seconds, if not it closes the socket and Kopete
> reconnects the protocol.

The watcher looks semantically wrong, and from how I read it, it's mostly luck
that it works in the first place. What it does is raise a
"RemoteHostClosedError", which is likely not what happened. What happens is
that the local client decides to break the link. It is only lucky that the
client then proceeds with a sane disconnection.

Effectively though, trying to disconnect in such a situation is making things
worse, since if the mechanism is working correctly, it's trying to force a
connection state change over an already bad link. If the underlying network
doesn't manage to work around the cause, don't try to irritate the TCP/IP
stacks on client and server! Let the protocol works its magic.

In short, a watchdog may be a good thing with protocols using an
application-layer ACK, but when fiddling with TCP internals, that's likely not
a good idea.

> I thing that we may mix to bugs here:
> 1. Unstable Internet connection => SocketTimeoutWatcher disconnects often.
> 2. Jabber protocol problem with ping.

I think it's really the same thing, just observed differently depending on
whether the explicit ping is used or not.

> Btw. I use jabber.cz and ICQ and I don't have any problems.

I only have the problem at the office, where the Jabber server is in the local
network. It works fine from home.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the kopete-bugs mailing list