Ticket #79 (closed Tasks: fixed)
Implement server polling
Reported by: | ZeroCoolZ | Owned by: | octo |
---|---|---|---|
Priority: | normal | Milestone: | 2.1 |
Component: | LogicMail | Version: | 0.4 |
Keywords: | Cc: | adam.wos@… | |
Blocked By: | #253 | Blocking: | #329 |
Description
Hi!
I know some people asked for some IMAP/Push feature and that you may be working on that.
But in the meantime, a feature that auto-refresh status every 10 or 15 minutes would be great! I would guess it's an easy feature to code but I don't know...
Thanks!
Change History
comment:2 Changed 9 years ago by octo
- Owner set to octo
- Status changed from new to assigned
- Type changed from Feature Requests to Tasks
- Summary changed from Status auto-refresh to Implement server polling
This feature, when combined with IMAP IDLE, should make it possible to leave LogicMail running continuously in the background. It will take some research, and may function differently for IMAP and POP, but it needs to get done.
The biggest protocol difference is that with IMAP we can maintain open server connections for far longer. That is for two reasons: First, POP essentially locks the mailbox when you're connected. That means no one else can use it, and new messages do not magically appear. Second, IMAP has the IDLE feature which could allow indefinite connections in rare cases of continuous network coverage.
comment:5 Changed 8 years ago by octo
- Blocked By 253 added
(In #253) The short-term workaround for this is to close and re-open the message or folder list screen that the error appeared on top of. This should re-try the failed operation. For a developer ramble about the real fix, feel free to read on...
Both IMAP and POP are susceptible to this issue, in different ways. With IMAP, the IDLE-checking behavior will cause the IOException (with "Bad socket id") to appear immediately. With POP, it won't appear until the user deliberately does something that requires I/O.
The fix for this issue could be quite involved, and will definitely be required before #79 can be implemented for 2.0.
The first step of working this issue will be inside the state machine that handles the network connections (AbstractMailConnectionHandler). It needs to specifically identify IOException errors that are due to runtime connection failures. It then needs to intelligently decide whether to retry (without flushing the request queue) or fail. It then needs to pass up additional information in the request failure notification, indicating what just happened.
The second step involves reviewing and modifying at least some of the request-handler code inside the object model, such that connection-failure errors are not always fatal to a complex request (such as a folder or message refresh).
Reassigning to 2.0, since it will be an option there (for those who don't want their BB talking to the server 24/7). Not simple or possible on 1.x.