BF: stop all communications before stopping the jails (Close gh-7)

It is necessary because otherwise if jails actions try to communicate
to the server we are getting a lockup since threads are locked
_tent/expose_banned_ips
Yaroslav Halchenko 13 years ago
parent fbce415622
commit 16322440ed

@ -107,9 +107,15 @@ class Server:
self.__loggingLock.release()
def quit(self):
self.stopAllJail()
# Stop communication
# Stop communication first because if jail's unban action
# tries to communicate via fail2ban-client we get a lockup
# among threads. So the simplest resolution is to stop all
# communications first (which should be ok anyways since we
# are exiting)
# See https://github.com/fail2ban/fail2ban/issues/7
self.__asyncServer.stop()
# Now stop all the jails
self.stopAllJail()
def addJail(self, name, backend):
self.__jails.add(name, backend)

Loading…
Cancel
Save