mirror of
https://github.com/tickstep/aliyunpan.git
synced 2025-01-23 14:32:14 +08:00
fix refresh open token may occurs nil pointer exception
This commit is contained in:
parent
425dddf92b
commit
0064a23f64
@ -222,7 +222,7 @@ func RefreshOpenTokenInNeed(activeUser *config.PanUser) bool {
|
||||
|
||||
// refresh expired openapi token
|
||||
if activeUser.PanClient().OpenapiPanClient() != nil {
|
||||
if len(activeUser.OpenapiToken.AccessToken) > 0 {
|
||||
if activeUser.OpenapiToken != nil && len(activeUser.OpenapiToken.AccessToken) > 0 {
|
||||
cz := time.FixedZone("CST", 8*3600) // 东8区
|
||||
expiredTime := time.Unix(activeUser.OpenapiToken.Expired, 0).In(cz)
|
||||
now := time.Now()
|
||||
|
Loading…
Reference in New Issue
Block a user