code: def __reconnect(self):
          
          # Cancel the timer, if any
          self.__stop_timer()
  
          try:
              # Try to reconnect the server
              result_code = self.__mqtt.reconnect()
              if result_code:
                  # Something wrong happened
                  message = "Error connecting the MQTT server: {0} ({1})".format(
                      result_code, paho.error_string(result_code)
                  )
                  _logger.error(message)
                  raise ValueError(message)
          except Exception as ex:
              # Something went wrong: log it
              _logger.error("Exception connecting server: %s", ex)
          finally:
              # Prepare a reconnection timer. It will be cancelled by the
              # on_connect callback
              self.__start_timer(10)
docs: Tries to connect to the MQTT server