mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-05-22 03:45:24 +00:00
In case of timeout or exception, wait "check_timeout" before to try a new connexion (documentation : "or the number of seconds until the next mail check"). (#377)
Else in case of a mail server issue, we try to connect again each 5 seconds.
This commit is contained in:
@@ -69,8 +69,8 @@ class IMAPConnection(MailboxConnection):
|
||||
idle_timeout=check_timeout)
|
||||
except (timeout, IMAPClientError):
|
||||
logger.warning("IMAP connection timeout. Reconnecting...")
|
||||
sleep(5)
|
||||
sleep(check_timeout)
|
||||
except Exception as e:
|
||||
logger.warning("IMAP connection error. {0}. "
|
||||
"Reconnecting...".format(e))
|
||||
sleep(5)
|
||||
sleep(check_timeout)
|
||||
|
||||
Reference in New Issue
Block a user