Allow keepalive to be overridden by user if imapfolders is set

This commit is contained in:
James Bunton 2009-02-10 15:57:03 +11:00
parent 3847d0ba9d
commit 8cd2bdf7f5

View File

@ -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