[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [imapsync] Courier -- Trying command when NOT connected!
|
From |
Gilles LAMIRAL <gilles dot lamiral at laposte dot net> |
|
Subject |
Re: [imapsync] Courier -- Trying command when NOT connected! |
|
Date |
Wed, 09 Nov 2011 23:48:50 +0100 |
Hello,
> Ok, I glanced at the code for imapsync 1.452 and it appears to me that
> there are no longer checks inside the "MESS:" loop to deal with cases
> where an IMAP connection is lost. I didn't try to follow the code all
> the way through to see if all the copied/overridden methods try to do
> something, but that's not something I'm interested in discovering.
>
> The old, old code had the following checks within the MESS: loop, but
> I didn't see them anymore:
>
> last FOLDER if $from->IsUnconnected();
> last FOLDER if $to->IsUnconnected();
> I'm going to leave this one with Gilles to see if he can uncover where
> the missing checks are for this case and perhaps others.
I removed those lines after testing the reconnect mechanism
but I was wrong about it. In fact sometimes a server says
Bye, I think the reconnect doesn't deal about it, but
a reconnect could be performed by imapsync, then a last FOLDER
in case of failure. Also a global reconnect count $imap->Reconnect_counter()
would be a good value to estimate how much problem there is
on a connection and be a criteria to give up the transfer.
The current reconnectretry is good but applies
only on one IMAP command (no one understand this with imapsync).
Last time I played with reconnect() it didn't work in every situation.
I had to write a relogin_imap() function beginning with a logout,
the IMAPClient Socket state was not clear. Last imapsync
releases don't use relogin_imap() anymore.
I will give reconnect() a retry soon.
--
Au revoir, 09 51 84 42 42
Gilles Lamiral. France, Baulon (35580) 06 20 79 76 06