def METHOD_NAME(self):
    if not self._enabled:
        return
    with self._check_mutex:
        self._logger.debug(
            "Checking against {}:{} if we are online...".format(
                self._host, self._port
            )
        )
        old_value = self._online
        for _ in range(3):
            connection_working = server_reachable(self._host, port=self._port)
            if self._name:
                if connection_working:
                    self._logger.debug(f"Checking if we can resolve {self._name}...")
                    resolution_working = len(resolve_host(self._name)) > 0
                else:
                    resolution_working = False
            else:
                resolution_working = True
            if not (connection_working and resolution_working):
                # retry up to 3 times
                time.sleep(1.0)
                continue
            # all good
            break
        self._connection_working = connection_working
        self._resolution_working = resolution_working
        new_value = self._online
        if old_value != new_value:
            self._trigger_change(old_value, new_value)