mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
Services: Unbound DNS - dnsbl_module.py - prevent os.write() on None when another thread closed the pipe (self._pipe_fd)
This commit is contained in:
parent
3cb2f3d794
commit
b8734ae852
@ -225,7 +225,7 @@ class Logger:
|
||||
l = self._pipe_buffer.popleft()
|
||||
res = "{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}|{}\n".format(*['' if x is None else x for x in l])
|
||||
os.write(self._pipe_fd, res.encode())
|
||||
except (BrokenPipeError, BlockingIOError) as e:
|
||||
except (BrokenPipeError, BlockingIOError, TypeError) as e:
|
||||
if e.__class__.__name__ == 'BrokenPipeError':
|
||||
log_info("dnsbl_module: Logging backend closed connection. Closing pipe and continuing.")
|
||||
os.close(self._pipe_fd)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user