def stop ( self , dummy_signum = None , dummy_frame = None ) : logging . info ( 'Shutting down ...' ) self . socket . close ( ) sys . exit ( 0 )
python close shutdown socket
Shutdown process ( this method is also a signal handler )
def stop(self, dummy_signum=None, dummy_frame=None):
        """ Shutdown process (this method is also a signal handler) """
        logging.info('Shutting down ...')
        self.socket.close()
        sys.exit(0)