code: def run(self):
          
          while True:
              self.connect_lock.acquire()
              if self.stopped():
                  return
              self.__connect()
              self.connect_lock.release()
              self.ws.run_forever()
docs: If the connection drops, then run_forever will terminate and a
          reconnection attempt will be made.