- [ ] 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!
```

}
            } catch (Throwable t) {
                logger.warn("fail to check pass for url: " + url + ", check id is: " + checkId);
            }
        }
    }
    private Response<List<HealthService>> getHealthServices(String service, long index, int watchTimeout) {
        HealthServicesRequest request = HealthServicesRequest.newBuilder()
                .setTag(SERVICE_TAG)
                .setQueryParams(new QueryParams(watchTimeout, index))
                .setPassing(true)
                .build();
        return client.getHealthServices(service, request);
    }
    private Response<Map<String, List<String>>> getAllServices(long index, int watchTimeout) {
        CatalogServicesRequest request = CatalogServicesRequest.newBuilder()
                .setQueryParams(new QueryParams(watchTimeout, index))
                .build();
        return client.getCatalogServices(request);
    }
    private List<HealthService> getHealthServices(Map<String, List<String>> services) {
        return services.entrySet().stream()
                .filter(s -> s.getValue().contains(SERVICE_TAG))
                .map(s -> getHealthServices(s.getKey(), -1, -1).getValue())
                .flatMap(Collection::stream)
                .collect(Collectors.toList());
    }
    private boolean isConsumerSide(URL url) {
        return url.getProtocol().equals(CONSUMER_PROTOCOL);
    }