mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 11:04:42 +00:00
unbound: fix typo in logger. create a pipe early in dnsbl_module.py (#6340)
This commit is contained in:
parent
674ddc0d21
commit
5d77a44ccf
@ -188,7 +188,7 @@ class DNSReader:
|
||||
r_count = 0
|
||||
pipe_ready = False
|
||||
# give dnsbl_module.py some time to create a pipe
|
||||
while r_count < 3 and not pipe_ready:
|
||||
while not pipe_ready:
|
||||
try:
|
||||
# open() will block until a query has been pushed down the fifo
|
||||
self.fd = open(self.target_pipe, 'r')
|
||||
@ -196,8 +196,8 @@ class DNSReader:
|
||||
except InterruptedError:
|
||||
self.close_logger()
|
||||
except OSError:
|
||||
r_count =+ 1
|
||||
if r_count == 3:
|
||||
r_count += 1
|
||||
if r_count > 10:
|
||||
syslog.syslog(syslog.LOG_ERR, "Unable to open pipe. This is likely because Unbound isn't running.")
|
||||
sys.exit(1)
|
||||
time.sleep(1)
|
||||
|
||||
@ -65,9 +65,9 @@ class ModuleContext:
|
||||
self.lock = Lock()
|
||||
self.pipe_buffer = deque(maxlen=100000) # buffer to hold qdata as long as a backend is not present
|
||||
|
||||
self.update_dnsbl(self.log_update_time)
|
||||
if self.stats_enabled:
|
||||
self.create_pipe_rdv()
|
||||
self.update_dnsbl(self.log_update_time)
|
||||
|
||||
def dnsbl_exists(self):
|
||||
return os.path.isfile(self.dnsbl_path) and os.path.getsize(self.dnsbl_path) > 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user