[PATCH 10/13] Let the user configure how long to IDLE for
Ethan Glasser-Camp
ethan at betacantrips.com
Sun Feb 6 16:59:04 GMT 2011
This commit was originally by James Bunton <jamesbunton at fastmail.fm>.
---
offlineimap/repository/IMAP.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/offlineimap/repository/IMAP.py b/offlineimap/repository/IMAP.py
index cc8dd57..caa8c86 100644
--- a/offlineimap/repository/IMAP.py
+++ b/offlineimap/repository/IMAP.py
@@ -79,9 +79,11 @@ class IMAPRepository(BaseRepository):
return self.getconfboolean("holdconnectionopen", 0)
def getkeepalive(self):
- if self.getidlefolders():
+ num = self.getconfint("keepalive", 0)
+ if num == 0 and self.getidlefolders():
return 29*60
- return self.getconfint("keepalive", 0)
+ else:
+ return num
def getsep(self):
return self.imapserver.delim
--
1.7.1
More information about the OfflineIMAP-project
mailing list