Skip to content

Any other command than DONE while in idle hangs #278

@NicolasLM

Description

@NicolasLM

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 ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions