Re: [Evolution-hackers] Cannot reconnect from EBackend-s like in Camel



On Mon, 2012-07-16 at 13:41 +0200, Milan Crha wrote:
> there seems to be missing functionality in EBackend descendants to
> reconnect on connection lost, like is possible in Camel. With Camel,
> I check returned error for certain values and if the error is one of the
> known for connection issues, then I just disconnect and the next attempt
> for online operation reconnects the CamelService as its first action.

Reading between the lines, it sounds like you're relying on the client
to tell you when to connect.  But EBackends are more autonomous now that
they can authenticate on their own and no longer honor Evolution's
artificial offline mode.

A client's D-Bus connection to a backend and the backend's network
connection to a remote host are orthogonal states.  If the remote host
is reachable, the backend can and should connect and authenticate on its
own as needed without waiting for a client to tell it to.

Check the network connection and re-connect if necessary as the first
step in any D-Bus method invocation handler, and it seems like the same
pattern as CamelService ought to work for EBackend as well.

I'm probably oversimplifying a little.

Matt




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]