Commit 1e715a9c authored by Leo Pound Singer's avatar Leo Pound Singer
Browse files

Limit duration in IMAP IDLE mode

parent 23f06e62
......@@ -58,11 +58,9 @@ class Receiver(EmailBootStep):
conn.delete_messages(msgid)'Starting idle')
responses = []
while self._running and not responses:'Checking idle')
responses = conn.idle_check(timeout=5)'Idle responses: %r', responses)
for _ in range(60): # Stay in IDLE mode at most 5 min
if not self._running or conn.idle_check(timeout=5):
break'Idle done')
except IMAPClientAbortError:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment