|
@@ -20,7 +20,7 @@ func NewClient(appID, appSecret, token, encodingAESKey string) *Client {
|
|
|
if v, ok := cache.Load(key); ok {
|
|
|
return v.(*Client)
|
|
|
}
|
|
|
- c := &Client{AppID: appID, AppSecret: appSecret, Token: token, EncodingAESKey: encodingAESKey, ReadLock: new(sync.Mutex)}
|
|
|
+ c := &Client{AppID: appID, AppSecret: appSecret, Token: token, EncodingAESKey: encodingAESKey, ReadLock: &sync.Mutex{}}
|
|
|
cache.Store(key, c)
|
|
|
return c
|
|
|
}
|