[Imaplib2-devel] Gmail: downloading the rest of the mails
Sebastian Spaeth
sebastian at sspaeth.de
Thu Oct 13 07:16:02 BST 2011
On Mon, 10 Oct 2011 22:11:32 +1100, Piers Lauder <piers at janeelix.com> wrote:
> You could try tinkering with the code around the "read 0" message. Try
> making the loopcount longer, and see if that avoids the problem. At
> the moment it tries 5 times, with a 0.1 sec sleep after each read 0,
> which is 1/2 second. I guess its interesting that the read doesn't
> raise an exception for broken socket, so it might be worthwhile hanging
> around longer.
>
> Is this by any chance an SSL socket? If so it maybe the SSL code that
> isn't handling the socket disconnection properly, though that does
> seem unlikely.
>
> Anyway, I still think a "read 0" should mean EOF, so that restarting a new
> connection is the correct response.
Yes, as these are all gmail connections, they are all SSL sockets.
It could well be that gmail simply delays sending for some time, so
imaplib2 trips over the 5*0.1 sec limit. Killing the connection and
re-establishing will of course work, unless gmail considers that abusive
and locks us out.
Sebastian.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20111013/584f927c/attachment-0001.sig>
More information about the OfflineIMAP-project
mailing list