No longer checks for newer blocklist on startup
This commit is contained in:
parent
7c6319b1db
commit
2ea8ca1000
|
@ -266,6 +266,10 @@ class Core(CorePluginBase):
|
||||||
log.debug("Empty blocklist")
|
log.debug("Empty blocklist")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
# If blocklist has just started up don't check for updates
|
||||||
|
if not self.has_imported:
|
||||||
|
return False
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
socket.setdefaulttimeout(self.config["timeout"])
|
socket.setdefaulttimeout(self.config["timeout"])
|
||||||
|
|
||||||
|
@ -278,6 +282,7 @@ class Core(CorePluginBase):
|
||||||
log.debug("Unable to get blocklist stats: %s", e)
|
log.debug("Unable to get blocklist stats: %s", e)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
# Check if remote blocklist is newer (in date or size)
|
||||||
if list_time < remote_time or list_size < remote_size:
|
if list_time < remote_time or list_size < remote_size:
|
||||||
log.debug("Newer blocklist exists (%s & %d vs %s & %d)", remote_time, remote_size, list_time, list_size)
|
log.debug("Newer blocklist exists (%s & %d vs %s & %d)", remote_time, remote_size, list_time, list_size)
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue