The retry loop is missing the condition where the key does not exist and thus keeps looping until the timeout is raised. The method should fail immediately if the key doesn't exist.