[Telepathy] Reusing Connection objects
Robert McQueen
robert.mcqueen at collabora.co.uk
Thu Jun 8 06:18:12 PDT 2006
Andre Magalhaes wrote:
> Ah, ok. I just want know if this was intentional or not. The question
> was because on the very beggining of tapioca, we had some problems
> with connection manager auto destruction. I can't remember exactly
> what it was, but it was something like. The connection manager lost
> the connection and then send the signal (Disconnected) to the UI
> (which is async), so when the UI received the signal, the connection
> manager already had destroyed the connection and the UI, tried to use
> it, for some reason. But if you have no problem with this, it's ok.
Yeah, I think that's pretty much behaving as intended. Channels do the
same 'Closed' *disappear*, I think it's just an occupational hazard. :)
We actually have a related race condition in the 0.12.x specs, which is
that the manager's Connect method returns you the bus name & object path
of the connection which is in the CONNECTING state. The problem is that
it could fail very quickly and then emit StatusChanged: DISCONNECTED and
disappear before the client got a chance to create their proxy object
and attach to the StatusChanged signal, leaving it waiting for ever and
ever for connecting to succeed.
The 0.13.x spec fixes this by making Connection objects start off in the
DISCONNECTED state, so that you get the bus name & object path, and can
hook up signals etc before you call Connect on the object, but the
change was too invasive to make at the moment. In a few weeks we'll have
a flag day and get everything using the improved spec.
> BR
> Andrunko
Regards,
Rob
More information about the Telepathy
mailing list