[PATCH] Re: Protect IMAP.getmessage() against dropped connections

Nicolas Sebrecht nicolas.s-dev at laposte.net
Tue Sep 6 18:02:59 BST 2011

On Mon, Sep 05, 2011 at 10:27:47AM +0200, Sebastian Spaeth wrote:
> If a connection is dropped for some reason while fetching a message, the
> imapobj.uid command throws an imapbj.abort() Exception which means we are
> supposed to retry. Implement a fail loop that drops the connection, gets a
> new one and attempts the command another time.
> Remove obsolete comment that we need to catch nonexisting messages. We do
> now.
> GMail seems to drop connections left and right. This patch is a response to
> the reported mail "4E5F8D8C.1020005 at gmail.com" by zeek
> <ezekiel.das at gmail.com>.
> Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
> ---
> This patch protects the getmessage() call against dropped connections
> and retres (once) if a connection has been dropped. It seems Gmail drops
> connections all the time, as the previous select() succeeded. Any
> comments.

Looks right to me. Merged. This tend to make us hide real causes,

Nicolas Sebrecht

More information about the OfflineIMAP-project mailing list