protected void subscribeAndHandleErrors(ConfigSubscription<?> sub, ConfigKey<?> configKey, ConfigHandle<?> handle, TimingValues timingValues) {
        subscriptionHandles.add(handle);
        // Must block here until something available from the subscription, so we know that it offers something when the user calls nextConfig
        boolean subOk = sub.subscribe(timingValues.getSubscribeTimeout());
        throwIfExceptionSet(sub);
        if (!subOk) {
            //sub.close();
            //subscriptionHandles.remove(handle);
            throw new ConfigurationRuntimeException("Subscribe for '" + configKey + "' timed out (timeout was " + timingValues.getSubscribeTimeout() + " ms): " + sub);
        }
    }
Subscribes on the given type of {@link ConfigInstance} with the given config id and subscribe timeout.

The method blocks until the first config is ready to be fetched with {@link #nextConfig(boolean)}.

@param configClass The class, typically generated from a def-file using config-class-plugin
@param configId    Identifies the service in vespa-services.xml, or possibly raw:, file:, dir: or jar: type config which addresses config locally.
@param timeoutMillis The time to wait for a config to become available, in milliseconds
@return a ConfigHandle
config/src/main/java/com/yahoo/config/subscription/ConfigSubscriber.java