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

Program hanging when trying to connect to gmail. #219

Open
Yamboy1 opened this issue Nov 7, 2021 · 5 comments
Open

Program hanging when trying to connect to gmail. #219

Yamboy1 opened this issue Nov 7, 2021 · 5 comments

Comments

@Yamboy1
Copy link

Yamboy1 commented Nov 7, 2021

My program will often hang at client.login when connecting to gmail. I have tested this with multiple gmail accounts. I haven't had a chance to test this with any other imap servers to see if there's a difference. This doesn't happen all the time, but it does happen more often than not.

How could i help to address or work out where the issue is coming from? Btw, I'm new to rust, but not to open source or programming haha.

@jonhoo
Copy link
Owner

jonhoo commented Nov 10, 2021

Huh, that's very weird indeed! I would recommend enabling the debug boolean flag so that the library will print all of the interactions with the server, which should hopefully give some indication of where the hang occurs!

@Yamboy1
Copy link
Author

Yamboy1 commented Nov 10, 2021

I enabled the debug flag for the session (i think thats where you meant), and when it hangs, it still doesn't output anything, but when it does succeed, it prints out the debug of any commands that are sent once the connection is made. I can also confirm that the error occurs in the imap_login function.

@Yamboy1
Copy link
Author

Yamboy1 commented Nov 10, 2021

Whoops, imap_login was my code, imap::connect was where it appears to be hanging

@jonhoo
Copy link
Owner

jonhoo commented Nov 13, 2021

That's very suspicious. I think you might have to open up Wireshark or something like it to see what packets are being sent and where the delay actually comes from. We don't really do anything very magical in connect — it just connects to the server and sends the login command.

@641i130
Copy link
Contributor

641i130 commented Nov 16, 2022

How do we enable the debug boolean flag? I can't seem to find it in the documentation.
Found it:
#220 (comment)

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

3 participants