Only set valid optional limit on startup

This commit is contained in:
shortcutme 2017-02-09 01:57:44 +01:00
parent 56efa02820
commit 62c31e1fc3
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -104,7 +104,7 @@ class ContentDbPlugin(object):
(num, float(total) / 1024 / 1024, float(total_downloaded) / 1024 / 1024, time.time() - s)
)
if self.need_filling and self.getOptionalLimitBytes() < total_downloaded:
if self.need_filling and self.getOptionalLimitBytes() >= 0 and self.getOptionalLimitBytes() < total_downloaded:
limit_bytes = self.getOptionalLimitBytes()
limit_new = round((float(total_downloaded) / 1024 / 1024 / 1024) * 1.1, 2) # Current limit + 10%
self.log.debug(