Commit d4f47084 authored by Anael Beutot's avatar Anael Beutot
Browse files

Stop auth at SIGTERM.

parent 7576d782
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -124,6 +124,9 @@ class AuthHandler(object):
    def start(self):
        self.watcher.start()

    def stop(self):
        self.watcher.stop()


class MainLoop(object):
    def __init__(self, config_path):
@@ -266,6 +269,7 @@ class MainLoop(object):

    def stop(self, watcher=None, revents=None):
        logger.info('Exiting node...')
        self.auth.stop()
        # close rpc
        if self.rpc_con is not None:
            self.rpc_con.shutdown()