We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 077e445 commit b79370aCopy full SHA for b79370a
weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/WxMpServiceApacheHttpClientImpl.java
@@ -65,12 +65,7 @@ public String getAccessToken(boolean forceRefresh) throws WxErrorException {
65
Lock lock = this.getWxMpConfigStorage().getAccessTokenLock();
66
try {
67
lock.lock();
68
-
69
- if (forceRefresh) {
70
- this.getWxMpConfigStorage().expireAccessToken();
71
- }
72
73
- if (this.getWxMpConfigStorage().isAccessTokenExpired()) {
+ if (this.getWxMpConfigStorage().isAccessTokenExpired() || forceRefresh) {
74
String url = String.format(WxMpService.GET_ACCESS_TOKEN_URL,
75
this.getWxMpConfigStorage().getAppId(), this.getWxMpConfigStorage().getSecret());
76
0 commit comments