From 578f60c9718c124e7f461f5b3085bd239252a887 Mon Sep 17 00:00:00 2001 From: JustSong Date: Mon, 17 Apr 2023 20:59:37 +0800 Subject: [PATCH] fix: reduce token refresh waiting time (close #52) --- channel/token-store.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/channel/token-store.go b/channel/token-store.go index e88f1ba..9a6582f 100644 --- a/channel/token-store.go +++ b/channel/token-store.go @@ -24,7 +24,9 @@ var s tokenStore func TokenStoreInit() { s.Map = make(map[string]*TokenStoreItem) - s.ExpirationSeconds = 2 * 60 * 60 + // https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Get_access_token.html + // https://developer.work.weixin.qq.com/document/path/91039 + s.ExpirationSeconds = 2 * 55 * 60 // 2 hours - 5 minutes go func() { users, err := model.GetAllUsersWithSecrets() if err != nil {