docker-offlineimap/offlineimap
Sebastian Spaeth e145beb394 Fix "command CHECK illegal in state AUTH"
Dave identified a case where our new dropped connection handling did
not work out correctly: we use the retry_left variable to signify
success (0=success if no exception occured).

However, we were decrementing the variable AFTER all the exception
checks, so if there was one due to a dropped connection, it
could well be that we 1) did not raise an exception (because we want to
retry), and 2) then DECREMENTED retry_left, which indicated "all is
well, no need to retry".

The code then continued to check() the append, which failed with the
above message (because we obtained a new connection which had not even
selected the current folder and we were still in mode AUTH). The fix is
of course, to fix our logic: Decrement retry_left first, THEN decide
whether to raise() (retry_left==0) or retry (retry_left>0) which would
then correctly attempt another loop. I am sorry for this newbie type of
logic error. The retry count loop was too hastily slipped in, it seems.

Reported-by: Dave Abrahams <dave@boostpro.com>
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-26 16:13:52 +02:00
..
folder Fix "command CHECK illegal in state AUTH" 2011-09-26 16:13:52 +02:00
repository Fix another visiblename() glitch in determining the foldername to be created 2011-09-20 22:25:45 +02:00
ui Don't output thread ID in log 2011-09-19 19:59:39 +02:00
__init__.py Release 6.3.5-rc3 2011-09-21 02:32:50 +02:00
accounts.py Robustify error msg against more failure 2011-09-26 15:32:24 +02:00
CustomConfig.py Use SafeConfigParser for the configuration 2011-08-30 22:16:35 +02:00
error.py Introduce new error level FOLDER_RETRY 2011-09-06 19:00:21 +02:00
imaplib2.py imaplib2: bump to upstream version 2.28 (rev 8228a0f) 2011-08-15 12:21:38 +02:00
imaplibutil.py Check for SSL module existence and only do fingerprint check then 2011-09-12 19:45:16 +02:00
imapserver.py update CAPABILITIES after login 2011-09-21 02:32:45 +02:00
imaputil.py Do not fail calling dequote() with empty string 2011-09-26 15:16:59 +02:00
init.py Properly output errors when the main thread receives some 2011-09-19 09:34:25 +02:00
localeval.py Update FSF address 2006-08-12 05:15:55 +01:00
mbnames.py explicitly define symbols to import instead of 'import *' 2011-05-09 22:43:03 +02:00
syncmaster.py Remove weird SigListener class 2011-05-08 14:25:16 +02:00
threadutil.py fix broken ui Blinkenlights in multi-threaded mode 2011-05-18 18:38:05 +02:00