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

Add option to disable idle #234

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rpetersen27
Copy link

I don't know if anyone will ever have a look at this, but I just thought to give it a try.

This adds a new option idle which defaults to true and which can be used to prevent the connection from idling.

@nifgraup
Copy link
Contributor

nifgraup commented Apr 3, 2020

Thank @Holorium. Here are questions so I understand this better:

Do you have an example use case for this? Would unsetting the onupdate method be an alternative? Does make more sense to set this as constructor option or turn it off and on with a connected client?

@rpetersen27
Copy link
Author

Hi @nifgraup
I am looking at this library from the point of view, that some thousand users will have open IMAP connections. To make sure, that there are no notifications missing, I open two IMAP connections. One for IDLE and another for any other requests. To reduce the number of IDLEing processes, I wanted to disable IDLE for the second connection and just send a NOOP instead.
It actually does not matter that much, because I am always connected to a dovecot which supports PUSH-notifications and therefore I don't need to IDLE at all. But it would still be nice if the open connections do not IDLE but just NOOP.

So unsetting onupdate does not help in this case, because my goal is to reduce server load. And for me, it just makes sense to enable/disable it in the constructor as I am going to open new connections with different settings if needed.

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