```java
[14/12/21 15:14:33:695 CST] DubboShutdownHook  WARN protocol.AbstractInvoker:  [DUBBO] null, dubbo version: , current host: 30.225.12.132
java.lang.NullPointerException
	at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
	at org.apache.dubbo.metadata.MetadataInfo.getServiceInfo(MetadataInfo.java:178)
	at org.apache.dubbo.registry.client.InstanceAddressURL.getPath(InstanceAddressURL.java:133)
	at org.apache.dubbo.rpc.protocol.dubbo.LazyConnectExchangeClient.<init>(LazyConnectExchangeClient.java:65)
	at org.apache.dubbo.rpc.protocol.dubbo.ReferenceCountExchangeClient.replaceWithLazyClient(ReferenceCountExchangeClient.java:216)
	at org.apache.dubbo.rpc.protocol.dubbo.ReferenceCountExchangeClient.closeInternal(ReferenceCountExchangeClient.java:186)
	at org.apache.dubbo.rpc.protocol.dubbo.ReferenceCountExchangeClient.close(ReferenceCountExchangeClient.java:163)
	at org.apache.dubbo.rpc.protocol.dubbo.DubboInvoker.destroyInternal(DubboInvoker.java:174)
	at org.apache.dubbo.rpc.protocol.dubbo.DubboInvoker.destroy(DubboInvoker.java:141)
	at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.destroy(ListenerInvokerWrapper.java:89)
	at org.apache.dubbo.rpc.Invoker.destroyAll(Invoker.java:50)
	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.destroyAllInvokers(ServiceDiscoveryRegistryDirectory.java:345)
	at org.apache.dubbo.registry.integration.DynamicDirectory.destroy(DynamicDirectory.java:297)
	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.destroy(AbstractClusterInvoker.java:126)
	at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.destroy(MockClusterInvoker.java:80)
	at org.apache.dubbo.registry.client.migration.MigrationInvoker.destroy(MigrationInvoker.java:316)
	at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:72)
	at org.apache.dubbo.common.bytecode.proxy3.$destroy(proxy3.java)
	at org.apache.dubbo.config.utils.SimpleReferenceCache.destroyReference(SimpleReferenceCache.java:237)
	at org.apache.dubbo.config.utils.SimpleReferenceCache.lambda$destroyAll$5(SimpleReferenceCache.java:227)
	at java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1597)
	at org.apache.dubbo.config.utils.SimpleReferenceCache.destroyAll(SimpleReferenceCache.java:225)
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.unreferServices(DefaultModuleDeployer.java:403)
	at org.apache.dubbo.config.deploy.DefaultModuleDeployer.postDestroy(DefaultModuleDeployer.java:205)
	at org.apache.dubbo.rpc.model.ModuleModel.onDestroy(ModuleModel.java:107)
	at org.apache.dubbo.rpc.model.ScopeModel.destroy(ScopeModel.java:108)
	at org.apache.dubbo.rpc.model.ApplicationModel.onDestroy(ApplicationModel.java:252)
	at org.apache.dubbo.rpc.model.ScopeModel.destroy(ScopeModel.java:108)
	at org.apache.dubbo.config.DubboShutdownHook.doDestroy(DubboShutdownHook.java:67)
	at org.apache.dubbo.config.DubboShutdownHook.run(DubboShutdownHook.java:62)
```
import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import static org.apache.dubbo.remoting.Constants.SEND_RECONNECT_KEY;
import static org.apache.dubbo.rpc.protocol.dubbo.Constants.DEFAULT_LAZY_CONNECT_INITIAL_STATE;
import static org.apache.dubbo.rpc.protocol.dubbo.Constants.DEFAULT_LAZY_REQUEST_WITH_WARNING;
import static org.apache.dubbo.rpc.protocol.dubbo.Constants.LAZY_CONNECT_INITIAL_STATE_KEY;
import static org.apache.dubbo.rpc.protocol.dubbo.Constants.LAZY_REQUEST_WITH_WARNING_KEY;
/**
 * dubbo protocol support class.
 */
@SuppressWarnings("deprecation")
final class LazyConnectExchangeClient implements ExchangeClient {
    private final static Logger logger = LoggerFactory.getLogger(LazyConnectExchangeClient.class);
    protected final boolean requestWithWarning;
    private final URL url;
    private final ExchangeHandler requestHandler;
    private final Lock connectLock = new ReentrantLock();
    private final int warningPeriod = 5000;
    /**
     * lazy connect, initial state for connection
     */
    private final boolean initialState;
    private volatile ExchangeClient client;
    private AtomicLong warningCount = new AtomicLong(0);
    public LazyConnectExchangeClient(URL url, ExchangeHandler requestHandler) {
        
        this.url = new ServiceConfigURL(url.getProtocol(), url.getUsername(), url.getPassword(), url.getHost(), url.getPort(), url.getPath(), url.getParameters())
            .addParameter(SEND_RECONNECT_KEY, Boolean.TRUE.toString());