diff --git a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java index 296542a62..81f47d776 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/service/ConfigSubService.java @@ -124,7 +124,9 @@ public class ConfigSubService { ipList.get(i)); } } catch (TimeoutException e) { - f.cancel(true); + if (f != null) { + f.cancel(true); + } LogUtil.defaultLog.warn( "get task result with TimeoutException: {} ", e .getMessage());