Skip to content

Commit

Permalink
fix: multi client in direct mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hujingkang committed Sep 30, 2022
1 parent cc6667c commit 2defc68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/nacos-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? 'public';
return {
name: `DiamondClient@${host}`,
name: `DiamondClient@${host}#${namespace}`,
};
}

Expand Down

0 comments on commit 2defc68

Please sign in to comment.