When calling idle_start(), if the server closes the connection instead of responding with + idling, the function will hang indefinitely (regardless of the timeout arg).
Tested using aioimaplib v1.1.0, python v3.11.2.
I experienced this issue when connected to imap.gmx.com, however the following code demonstrates the bug in isolation.
Log when the server responds normally (no issue):
[root:DEBUG] idle_start()
[aioimaplib.aioimaplib:DEBUG] Sending : b'EMNN3 IDLE\r\n'
[aioimaplib.aioimaplib:DEBUG] Received : b'+ idling\r\n'
[aioimaplib.aioimaplib:DEBUG] continuation line -- assuming IDLE is active : b'+ idling'
[root:DEBUG] wait_server_push()
[root:DEBUG] Timeout - wait_server_push
[aioimaplib.aioimaplib:DEBUG] connection lost: None
[root:DEBUG] onConnLost()
<process exits here>
Log when the connection is closed:
[root:DEBUG] idle_start()
[aioimaplib.aioimaplib:DEBUG] Sending : b'GGPL3 IDLE\r\n'
[aioimaplib.aioimaplib:DEBUG] Received : b'* BYE timeout\r\n'
[aioimaplib.aioimaplib:DEBUG] connection lost: None
[root:DEBUG] onConnLost()
<process is still running and never exits>
When calling
idle_start()
, if the server closes the connection instead of responding with+ idling
, the function will hang indefinitely (regardless of the timeout arg). Tested using aioimaplib v1.1.0, python v3.11.2.I experienced this issue when connected to
imap.gmx.com
, however the following code demonstrates the bug in isolation.Log when the server responds normally (no issue):
Log when the connection is closed:
Code: