mirror of https://github.com/fail2ban/fail2ban
ensure the reader is really closed before reopen (preventing leaks if some handles or whatever are still open)
parent
994a0b69da
commit
f49d50b8fd
|
@ -126,6 +126,7 @@ class FilterSystemd(JournalFilter): # pragma: systemd no cover
|
||||||
try:
|
try:
|
||||||
# workaround for gh-3929 (no journal descriptor after rotation),
|
# workaround for gh-3929 (no journal descriptor after rotation),
|
||||||
# to reopen journal we'd simply invoke inherited init again:
|
# to reopen journal we'd simply invoke inherited init again:
|
||||||
|
self.__journal.close()
|
||||||
ja = self.__jrnlargs
|
ja = self.__jrnlargs
|
||||||
super(journal.Reader, self.__journal).__init__(ja.get('flags', 0), ja.get('path'), ja.get('files'), ja.get('namespace'))
|
super(journal.Reader, self.__journal).__init__(ja.get('flags', 0), ja.get('path'), ja.get('files'), ja.get('namespace'))
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in New Issue