Merge branch 'ss/maxconnections-to-2' into next

This commit is contained in:
Nicolas Sebrecht 2011-03-06 18:31:06 +01:00
commit 607eba178a
2 changed files with 6 additions and 4 deletions

View File

@ -345,7 +345,7 @@ remoteuser = username
# cases, it may slow things down. The safe answer is 1. You should
# probably never set it to a value more than 5.
maxconnections = 1
maxconnections = 2
# OfflineIMAP normally closes IMAP server connections between refreshes if
# the global option autorefresh is specified. If you wish it to keep the

View File

@ -295,8 +295,9 @@ class OfflineImap:
remoterepos = None
localrepos = None
threadutil.initInstanceLimit("ACCOUNTLIMIT",
config.getdefaultint("general", "maxsyncaccounts", 1))
threadutil.initInstanceLimit('ACCOUNTLIMIT',
config.getdefaultint('general',
'maxsyncaccounts', 1))
for reposname in config.getsectionlist('Repository'):
for instancename in ["FOLDER_" + reposname,
@ -305,7 +306,8 @@ class OfflineImap:
threadutil.initInstanceLimit(instancename, 1)
else:
threadutil.initInstanceLimit(instancename,
config.getdefaultint('Repository ' + reposname, "maxconnections", 1))
config.getdefaultint('Repository ' + reposname,
'maxconnections', 2))
siglisteners = []
def sig_handler(signum, frame):
if signum == signal.SIGUSR1: