Open Yamboy1 opened 2 years ago
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!
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.
Whoops, imap_login was my code, imap::connect was where it appears to be hanging
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.
How do we enable the
Found it:
https://github.com/jonhoo/rust-imap/issues/220#issuecomment-1028612003debug
boolean flag? I can't seem to find it in the documentation.
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.