Really handling dropped connections

Sebastian Spaeth Sebastian at
Tue Sep 6 12:18:27 BST 2011


after communication with the imaplib2 author, I am convinced that we
were not really discarding connections when they were dropped. We check
for the .Terminate attribute, which according to him only gets set under
normal shutdown (and not on a dropped connection exception).

Therefore, I am presenting a new way to make sure we actually discard
broken connections. The first patch introduces a new parameter drop_conn
to the releaseconnection() function which makes sure, we actually
discard it and won't reuse it. Patch #2 makes use of that patch,
protecting us against dropped connections in the APPEND case.

The code runs fine here. Patch series follows as reply.

More information about the OfflineIMAP-project mailing list