From 79195a07500671578867e8bc07ab1f2a7eaedf1e Mon Sep 17 00:00:00 2001 From: hujingkang Date: Thu, 29 Sep 2022 20:36:35 +0800 Subject: [PATCH] fix: multi client in direct mode --- packages/nacos-config/src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nacos-config/src/index.ts b/packages/nacos-config/src/index.ts index 3e02822..ba17d2b 100644 --- a/packages/nacos-config/src/index.ts +++ b/packages/nacos-config/src/index.ts @@ -45,9 +45,10 @@ export class NacosConfigClient extends APIClientBase implements BaseClient { } get clusterOptions() { - const host = this.options.endpoint; + const host = this.options.endpoint || this.options.serverAddr; + const namespace = this.options.namespace || ''; return { - name: `DiamondClient@${host}`, + name: `DiamondClient@${host}#${namespace}`, }; }