- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: 2.7.x
* Operating System version: Mac OS
* Java version: N/A

### Steps to reproduce this issue

Run dubbo-demo project

1. Use consul as registry center
2. Start provider
3. Start consumer

Pls. provide [GitHub address] to reproduce this issue.

### Expected Result

The consumer can exit as usual

### Actual Result

The consumer cannot exit.

If there is an exception, please attach the exception trace:

```
Just put your stack trace here!
```

}
        try {
            String service = url.getServiceKey();
            Response<List<HealthService>> result = getHealthServices(service, -1, buildWatchTimeout(url));
            if (result == null || result.getValue() == null || result.getValue().isEmpty()) {
                return new ArrayList<>();
            } else {
                return convert(result.getValue(), url);
            }
        } catch (Throwable e) {
            throw new RpcException("Failed to lookup " + url + " from consul " + getUrl() + ", cause: " + e.getMessage(), e);
        }
    }
    @Override
    public boolean isAvailable() {
        return client.getAgentSelf() != null;
    }
    @Override
    public void destroy() {
        super.destroy();
        notifierExecutor.shutdown();
        ttlConsulCheckExecutor.shutdown();
    }
    private void checkPass() {
        for (URL url : getRegistered()) {
            String checkId = buildId(url);
            try {
                client.agentCheckPass("service:" + checkId);
                if (logger.isDebugEnabled()) {
                    logger.debug("check pass for url: " + url + " with check id: " + checkId);