From ae505063fe3aa4392e6eb8889cfd44feaf95f9ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=85=E5=AD=90?= Date: Wed, 14 Sep 2022 19:44:04 +0800 Subject: [PATCH] fix(apollo): config return nil when watch err --- contrib/config/apollo/watcher.go | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/config/apollo/watcher.go b/contrib/config/apollo/watcher.go index 670139a26..94ef2ef0b 100644 --- a/contrib/config/apollo/watcher.go +++ b/contrib/config/apollo/watcher.go @@ -31,6 +31,7 @@ func (c *customChangeListener) onChange(namespace string, changes map[string]*st value, err := c.apollo.client.GetConfigCache(namespace).Get("content") if err != nil { log.Warnw("apollo get config failed", "err", err) + return nil } kv = append(kv, &config.KeyValue{ Key: namespace,