-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Description
Issuing a LOGOUT while in IDLE makes the process hang. It is an invalid sequence in IMAP (the only command acceptable while in idle is DONE), but still IMAPClient should not hang waiting for a response that will never arrive.
c = imapclient.IMAPClient(host="host")
c.login("user", "pass")
c.select_folder("INBOX")
c.idle()
c.logout()2017-08-23 13:59:44,655 - DEBUG: > b'DCEI3 IDLE'
2017-08-23 13:59:44,690 - DEBUG: < b'+ idling'
2017-08-23 13:59:44,690 - DEBUG: > b'DCEI4 LOGOUT'
2017-08-23 13:59:44,724 - DEBUG: < b'DCEI3 BAD Expected DONE.'
2017-08-23 13:59:44,724 - DEBUG: BAD response: b'Expected DONE.'
... Process hanging here ...