fix: increment retry_count first to prevent recursion
This commit is contained in:
parent
81ebf219c3
commit
b59bf13682
1 changed files with 2 additions and 1 deletions
|
|
@ -280,8 +280,9 @@ class EmailServer:
|
|||
except imaplib.IMAP4.abort:
|
||||
if self.retry_count < self.retry_limit:
|
||||
self.connect()
|
||||
self.get_messages(folder)
|
||||
self.retry_count += 1
|
||||
self.get_messages(folder)
|
||||
|
||||
except Exception as e:
|
||||
if self.has_login_limit_exceeded(e):
|
||||
raise LoginLimitExceeded(e) from e
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue