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

imap_close #59

Closed
ghost opened this issue Jun 1, 2014 · 6 comments
Closed

imap_close #59

ghost opened this issue Jun 1, 2014 · 6 comments

Comments

@ghost
Copy link

ghost commented Jun 1, 2014

Shouldn't imap_close be called after each operation?

@tedivm
Copy link
Member

tedivm commented Jun 2, 2014

No, constantly closing and opening the connection would be a serious drain on resources for both the server and the client (in this case, whatever app is using Fetch). If you look at email clients that live on the desktop they all maintain their connection over the long term.

@ghost
Copy link
Author

ghost commented Jun 2, 2014

Doesn't this library naturally create a new connection across requests though? How does the connection stay persistent against a page reload for example?

@tedivm
Copy link
Member

tedivm commented Jun 2, 2014

It doesn't. Each page request or run of the application has it's own connection.

A change to this application that may make sense is adding imap_close to the Server object's destructor function, but it certainly should not be done after each operation.

@ghost
Copy link
Author

ghost commented Jun 2, 2014

+1 for that

@ghost
Copy link
Author

ghost commented Jun 3, 2014

#62 should take care of this :)

@ghost
Copy link
Author

ghost commented Jun 19, 2014

#69 is the latest version, now that I'm using branches...

This issue was closed.
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

No branches or pull requests

1 participant