[PATCH] Re: Drop all connections when a sync failed

Nicolas Sebrecht nicolas.s-dev at laposte.net
Wed Apr 27 22:05:49 BST 2011

On Wed, Apr 27, 2011 at 11:44:24AM +0200, Sebastian Spaeth wrote:
> in accounts.sync() we would holdordropconnections() after each sync. But
> depending on the repository configuration that might imply that
> offlineimap tries to keep the same connections. But when a sync failed,
> e.g. after a user had his computer suspended, it might be that our
> connections that we have are worthless. So definitely drop them after a
> failed sync.
> Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
> ---
> As the user reported that a gmail account failed up to 3 refresh times
> after a suspend (which would correspond to our lifetime of a connection
> that we try to keep open between syncs), I suspect that we never
> definitely close/drop connections after a sync failed. This patch should
> help with that by definitely dropping all connections when a sync raises
> an Exception.

Looks good. Thank you for the nice debug.

Nicolas Sebrecht

More information about the OfflineIMAP-project mailing list