We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nacos-sdk-go/clients/config_client/config_client.go
Line 265 in bcceb19
Line 374 in bcceb19
这里client.currentTaskCount在测试时出现了data race
The text was updated successfully, but these errors were encountered:
测试代码如下:
func main() { sc := []constant.ServerConfig{ *constant.NewServerConfig("127.0.0.1", 8848), } cc := constant.ClientConfig{ TimeoutMs: 5000, NotLoadCacheAtStart: true, LogDir: "/tmp/nacos/log", CacheDir: "/tmp/nacos/cache", LogLevel: "debug", } client, err := clients.NewConfigClient( vo.NacosClientParam{ ClientConfig: &cc, ServerConfigs: sc, }, ) if err != nil { panic(err) } _, pErr := client.PublishConfig(vo.ConfigParam{DataId: "test.yaml", Group: "test", Content: "test: test"}) if pErr != nil { fmt.Println(pErr) return } content := make(chan string, 100) e := client.ListenConfig(vo.ConfigParam{ DataId: "test.yaml", Group: "test", OnChange: func(_, group, dataId, data string) { if dataId == "test.yaml" && group == "test" { fmt.Println("input data: " + data) content <- data } }, }) if e != nil { fmt.Println(e) return } _, pErr = client.PublishConfig(vo.ConfigParam{DataId: "test.yaml", Group: "test", Content: "test: test"}) if pErr != nil { fmt.Println(pErr) return } err = client.CancelListenConfig(vo.ConfigParam{DataId: "test.yaml", Group: "test"}) if err != nil { fmt.Println(err) return } }
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
nacos-sdk-go/clients/config_client/config_client.go
Line 265 in bcceb19
nacos-sdk-go/clients/config_client/config_client.go
Line 374 in bcceb19
这里client.currentTaskCount在测试时出现了data race
The text was updated successfully, but these errors were encountered: