[Telepathy] Tubes and deconnections

Alban Crequy alban.crequy at collabora.co.uk
Tue Aug 12 08:59:31 PDT 2008


Hi,

I consider the following scenario:
- Alice offers a tube to Bob on Jabber (with Gabble)
- Bob sets his presence to offline.

Gabble on Bob's side closes the tube and sends the tube close stanza
to Alice before the disconnection. So the tube is closed nicely and
the Alice's application using the tube gives the correct feedback to
Alice.

With the second scenario: 
- Alice offers a tube to Bob on Jabber (with Gabble)
- Bob get disconnected and Bob's CM couldn't send the tube close stanza.
Alice sees Bob offline but the tube remains open indefinitely on
Alice's side.

Note that the problem is exactly the same with XMPP/Gabble and Salut: if
the Salut contact goes offline without sending the tube close stanza,
the tube remains open indefinitely.

I consider it is a problem and I am proposing to close the 1-1 tubes
when the CM sees a contact going offline. This solution fixes the
problem with XMPP/Gabble, but it does not really work with Salut with
the following scenario:

- Alice offers a stream tube to Bob
- Bob accepts the tube
- Bob does not request any stream yet
- Small network problem: Bob appears offline for a few seconds to
Alice. However, Bob always sees Alice online without interruption. This
asymmetric presence is possible with Avahi.
- Alice's CM closes the tube as soon as she sees Bob offline. Alice's CM
does not send the close tube stanza because it thinks Bob is
unreachable.
- The tube is closed on Alice's side but not on Bob's side
- Later, Bob's CM tries to initiate a stream in the tube. Alice's CM
does not have any reference on the tube, so Bob gets an error.

The problem is that Bob does not have any feedback for a long time,
until he tries to initiate a new stream.

We can see 2 solutions, but I am not really convinced:
- ping the other end, to know whether it still know the tube and it
is open
- keep the xmpp connection open while there is a tube, close the xmpp
connection if the CM sees the contact offline, and closes the tubes if
the xmpp connection gets closed.
- ignore the problem

Any thoughts?

-- 
Alban


More information about the Telepathy mailing list