Commit dffdc4a1 authored by zhaoyunxing92's avatar zhaoyunxing92

up:优化返回逻辑

parent 6889d2f0
...@@ -68,10 +68,9 @@ func NewNacosNamingClient(name string, share bool, sc []constant.ServerConfig, ...@@ -68,10 +68,9 @@ func NewNacosNamingClient(name string, share bool, sc []constant.ServerConfig,
} }
client, err := newNamingClient(sc, cc) client, err := newNamingClient(sc, cc)
if err != nil { if err == nil {
return nil, err clientPool.namingClient[name] = client
} }
clientPool.namingClient[name] = client
return client, err return client, err
} }
...@@ -89,10 +88,9 @@ func NewNacosConfigClient(name string, share bool, sc []constant.ServerConfig, ...@@ -89,10 +88,9 @@ func NewNacosConfigClient(name string, share bool, sc []constant.ServerConfig,
} }
client, err := newConfigClient(sc, cc) client, err := newConfigClient(sc, cc)
if err != nil { if err == nil {
return nil, err configClientPool.configClient[name] = client
} }
configClientPool.configClient[name] = client
return client, err return client, err
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment