Skip to content
Commit e7ba619b authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

pop3: Delete emails as we know we have saved them correctly instead of waiting to save them all

This patch removes the "Delete" state. This means that instead of:
 * Save all messages
 * Delete messages that need deletion

What we do is
 * Save one message
 * If that message needs deletion and there's no deletion job in process delete it, otherwise note it down for deletion later

This has two effects:
 * The whole process is faster since we can start deleting emails as we know we have saved it correctly instead of having to wait to save them all
 * The communication with the server is more continuous and that makes the yahoo server don't close the connection on me (before the "save all messages" state when downloading 200 emails sometimes takes more than 30 seconds and the yahoo server decides that if there has been no communication for more than 30 seconds it will close down the connection, and then very bad things happen since we try to delete the messages and the connection is gone, basically ending up in an infite loop of download 200 emails, saving takes more than 30 seconds, server closes connection, can't delete, download 200 emails, saving takes more than 30 seconds, server closes connection, etc.)

REVIEW: 127518
parent 21ba8042
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment