Skip to content
Snippets Groups Projects
close_connection.py 344 B
Newer Older
  • Learn to ignore specific revisions
  • from .my_logging import logging
    
    def on_timeout(the_connection):
    
        def close_connection():
            nonlocal the_connection
            # global connection
            logging.info('Waiting for messages...')
            the_connection.close()
    
            #sys.exit(0)
            #return
    
        return close_connection