Let the user configure how long to IDLE for

This commit was originally by James Bunton <jamesbunton@fastmail.fm>.

Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Ethan Glasser-Camp 2011-05-19 15:02:30 -04:00 committed by Nicolas Sebrecht
parent 36a0680191
commit 2cc2ead503

View File

@ -84,9 +84,11 @@ class IMAPRepository(BaseRepository):
return self.getconfboolean("holdconnectionopen", 0) return self.getconfboolean("holdconnectionopen", 0)
def getkeepalive(self): def getkeepalive(self):
if self.getidlefolders(): num = self.getconfint("keepalive", 0)
if num == 0 and self.getidlefolders():
return 29*60 return 29*60
return self.getconfint("keepalive", 0) else:
return num
def getsep(self): def getsep(self):
return self.imapserver.delim return self.imapserver.delim