code: def stop_listener_thread(self):
          
          if self.sync_thread:
              self.should_listen = False
              self.sync_thread.join()
              self.sync_thread = None
docs: Stop listener thread running in the background