Experimental connection recovery



I just committed experimental recovery and coping with connection
problems in Tinymail.

This is highly experimental and caused significant changes in nearly all
socket related infrastructure code of camel-lite. 

I am expecting bugs and certain difficulties, although I did test this
code too.

I know the stage of the project might not be the best for this type of
changes, although I also strongly believe that a software that will use
Tinymail as its 'engine' will soon require recovering from severe
connectivity problems. The changes, though, so far didn't introduce any
API nor ABI changes.

Although it would not be more easy to detect the event of a connectivity
problem more easily. Which in turn might mean that we can add a signal
to certain Tinymail types, so that the application developer can act on
the event.

When unplugging your connection you will notice that your ui will freeze
between 0 and 5 seconds.

This is, indeed, the timeout during the IDLE read(). It would be very,
extremely, hard to get this freeze to be non-existing (it would come
down to letting the IDLE checks happen in a worker thread rather than
using the GMainLoop for this, so it's not really extremely hard but it
is some major refactoring of the Push E-mail support code).

It will be experimenting to check whether we can shorten the timeout
time. For now I have set the value to 5 seconds timeout on both the
non-SSL and the SSL stream implementations.



-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://www.pvanhoof.be/blog







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