Skip to content

Commit

Permalink
Same as java client, default close async update service by query.
Browse files Browse the repository at this point in the history
  • Loading branch information
KomachiSion committed May 25, 2023
1 parent dee0c69 commit 848401a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clients/naming_client/naming_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ func NewNamingClient(nc nacos_client.INacosClient) (*NamingClient, error) {

naming.serviceProxy, err = NewNamingProxyDelegate(ctx, clientConfig, serverConfig, httpAgent, naming.serviceInfoHolder)

go NewServiceInfoUpdater(ctx, naming.serviceInfoHolder, clientConfig.UpdateThreadNum, naming.serviceProxy).asyncUpdateService()
if clientConfig.AsyncUpdateService {
go NewServiceInfoUpdater(ctx, naming.serviceInfoHolder, clientConfig.UpdateThreadNum, naming.serviceProxy).asyncUpdateService()
}
if err != nil {
return naming, err
}
Expand Down
1 change: 1 addition & 0 deletions common/constant/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type ClientConfig struct {
LogSampling *ClientLogSamplingConfig // the sampling config of log
LogRollingConfig *ClientLogRollingConfig // log rolling config
TLSCfg TLSConfig // tls Config
AsyncUpdateService bool // open async update service by query
}

type ClientLogSamplingConfig struct {
Expand Down

0 comments on commit 848401a

Please sign in to comment.