mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-15 02:35:08 +08:00
#324: 修复分布式刷新access_token冲突问题
This commit is contained in:
@@ -87,11 +87,7 @@ public class WxMaServiceImpl implements WxMaService, RequestHttp<CloseableHttpCl
|
||||
try {
|
||||
lock.lock();
|
||||
|
||||
if (forceRefresh) {
|
||||
this.getWxMaConfig().expireAccessToken();
|
||||
}
|
||||
|
||||
if (this.getWxMaConfig().isAccessTokenExpired()) {
|
||||
if (this.getWxMaConfig().isAccessTokenExpired() || forceRefresh) {
|
||||
String url = String.format(WxMaService.GET_ACCESS_TOKEN_URL, this.getWxMaConfig().getAppid(),
|
||||
this.getWxMaConfig().getSecret());
|
||||
try {
|
||||
|
Reference in New Issue
Block a user