mirror of https://github.com/fail2ban/fail2ban
BF: do not shutdown logging until all jails stop -- so move into Server.quit()
Together with previous commit it should resolve failures with the server tests on python < 2.6pull/124/head^2
parent
012264dce1
commit
154aa38e3f
|
@ -97,12 +97,6 @@ class Server:
|
|||
except OSError, e:
|
||||
logSys.error("Unable to remove PID file: %s" % e)
|
||||
logSys.info("Exiting Fail2ban")
|
||||
# Shutdowns the logging.
|
||||
try:
|
||||
self.__loggingLock.acquire()
|
||||
logging.shutdown()
|
||||
finally:
|
||||
self.__loggingLock.release()
|
||||
|
||||
def quit(self):
|
||||
# Stop communication first because if jail's unban action
|
||||
|
@ -112,8 +106,17 @@ class Server:
|
|||
# are exiting)
|
||||
# See https://github.com/fail2ban/fail2ban/issues/7
|
||||
self.__asyncServer.stop()
|
||||
|
||||
# Now stop all the jails
|
||||
self.stopAllJail()
|
||||
|
||||
# Only now shutdown the logging.
|
||||
try:
|
||||
self.__loggingLock.acquire()
|
||||
logging.shutdown()
|
||||
finally:
|
||||
self.__loggingLock.release()
|
||||
|
||||
|
||||
def addJail(self, name, backend):
|
||||
self.__jails.add(name, backend)
|
||||
|
|
Loading…
Reference in New Issue