diff --git a/auth.go b/auth.go index 76a6d79..ef1d098 100644 --- a/auth.go +++ b/auth.go @@ -113,5 +113,5 @@ func updateToken() { } // Append access token to access_tokens.json ACCESS_TOKENS = tokens.NewAccessToken(token_list, true) - time.AfterFunc(2.16e15, updateToken) + time.AfterFunc(1.728e15, updateToken) } diff --git a/main.go b/main.go index 3bc3dc0..b9a4faf 100644 --- a/main.go +++ b/main.go @@ -60,8 +60,8 @@ func init() { } else { nowTime := time.Now() usedTime := nowTime.Sub(stat.ModTime()) - // update access token 25 days after last modify token file - toExpire := 2.16e15 - usedTime + // update access token 20 days after last modify token file + toExpire := 1.728e15 - usedTime if toExpire > 0 { file, err := os.Open("access_tokens.json") if err != nil {