X-Git-Url: https://code.delx.au/offlineimap/blobdiff_plain/04554a8506ddb3f5ecbf10acfbb4b303a7fc429c..2bf3cb762adbb26d7f15ec20d9848ea3e5f7fbf1:/offlineimap/accounts.py diff --git a/offlineimap/accounts.py b/offlineimap/accounts.py index 8e96347..a86485d 100644 --- a/offlineimap/accounts.py +++ b/offlineimap/accounts.py @@ -83,16 +83,10 @@ class Account(CustomConfig.ConfigHelperMixin): refreshperiod = int(self.refreshperiod * 60) sleepresult = self.ui.sleep(refreshperiod) - if sleepresult == 2: - # Cancel keep-alive, but don't bother terminating threads - for item in kaobjs: - item.stopkeepalive(abrupt = 1) - return sleepresult - else: - # Cancel keep-alive and wait for thread to terminate. - for item in kaobjs: - item.stopkeepalive(abrupt = 0) - return sleepresult + # Cancel keepalive + for item in kaobjs: + item.stopkeepalive() + return sleepresult class AccountSynchronizationMixin: def syncrunner(self):