mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-10-24 19:48:56 +00:00
Reduce IMAP IDLE refresh rate to 5 minutes
G-Suite is resetting connections after 10 minutes
This commit is contained in:
1 parent
7c6a0b185a
commit
f19d623d7d
1 file changed
+3
-3
@@ -1438,9 +1438,9 @@ def watch_inbox(host, username, password, callback, reports_folder="INBOX",
|
||||
|
||||
while True:
|
||||
try:
|
||||
# Refresh the IDLE session every 10 minutes to stay connected
|
||||
if time.monotonic() - idle_start_time > 10 * 60:
|
||||
logger.info("IMAP: Refreshing IDLE session")
|
||||
# Refresh the IDLE session every 5 minutes to stay connected
|
||||
if time.monotonic() - idle_start_time > 5 * 60:
|
||||
logger.debug("IMAP: Refreshing IDLE session")
|
||||
server.idle_done()
|
||||
server.idle()
|
||||
idle_start_time = time.monotonic()
|
||||
|
||||
Reference in new issue
Block a user