aliyun / alibaba-cloud-sdk-go

Alibaba Cloud SDK for Go
Apache License 2.0
1.16k stars 271 forks source link

调用接口报错 data race #538

Open chuan-T opened 2 years ago

chuan-T commented 2 years ago

如下所示去调用

    request := requests.NewCommonRequest()
    request.Method = "GET"
    request.Scheme = "https" // https | http request.Domain = "dysmsapi.ap-southeast-1.aliyuncs.com"
    request.Version = "2018-05-01"
    request.ApiName = "QueryMessage"
    request.Domain = "dysmsapi.ap-southeast-1.aliyuncs.com"

    request.QueryParams["RegionId"] = "ap-southeast-1"
    request.QueryParams["MessageId"] = messageId

    response, err := ar.cli.ProcessCommonRequest(request)

error log

WARNING: DATA RACE
Read at 0x00c0038e86a0 by goroutine 348:
crypto/tls.(*Config).Clone()
 /usr/local/go/src/crypto/tls/common.go:768 +0x757
 net/http.cloneTLSConfig()
 /usr/local/go/src/net/http/transport.go:2856 +0xb1
 net/http.(*persistConn).addTLS()
 /usr/local/go/src/net/http/transport.go:1510 +0x45
 net/http.(*Transport).dialConn()
 /usr/local/go/src/net/http/transport.go:1610 +0x31b3
 net/http.(*Transport).dialConnFor()
 /usr/local/go/src/net/http/transport.go:1442 +0x151

Previous write at 0x00c0038e86a0 by goroutine 274:
 github.com/aliyun/alibaba-cloud-sdk-go/sdk.(*Client).DoActionWithSigner()
/go/pkg/mod/github.com/aliyun/alibaba-cloud-sdk-go@v1.61.1347/sdk/client.go:587 +0x220f
...

SDK 版本: v1.61.1347