Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imapclient: Enhancement - Add custom interval to IDLE command #603

Open
wants to merge 6 commits into
base: v2
Choose a base branch
from

Conversation

birudeghi
Copy link

@birudeghi birudeghi commented Mar 28, 2024

Although RFC states an IDLE timeout of 29 minutes, many IMAP servers timeout much earlier than that. Other forums point to around 10-13 minutes as a 'sweet spot'.

This PR gives more flexibility for those who need to adjust the restart interval. This also resolves issue #602

@emersion emersion mentioned this pull request Apr 8, 2024
@emersion
Copy link
Owner

emersion commented Apr 8, 2024

many IMAP servers timeout much earlier than that

Out of curiosity, do you have any examples of this?

Other forums point to around 10-13 minutes as a 'sweet spot'.

Any references?


Generally I'd prefer for Idle to Do The Right Thing™ by default. In other words, if in practice a restart interval of 10 minutes works better, I'm not opposed to lowering the current timeout.

If there really is a need to allow the restart interval to be customized, I'd prefer to break the API and add an IdleOptions struct, rather than introduce a completely new function (which BTW is a copy-paste of the other one).

@birudeghi
Copy link
Author

Lark IDLE timeout after every 10 minutes:

Screenshot 2024-04-10 at 20 17 34

Your change (ca0ddb7) does its job, albeit having to implement reconnect logic ourselves

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants