增加续期备注
parent
bb3f612772
commit
73fa62e6a2
|
|
@ -936,13 +936,13 @@ public class OSSService(IOptionsMonitor<ObjectStoreServiceOptions> options,
|
|||
{
|
||||
|
||||
|
||||
|
||||
// 过期时间 ≤ 当前时间 + 15分钟 时需要续期
|
||||
|
||||
if (ObjectStoreServiceOptions.ObjectStoreUse == "AliyunOSS")
|
||||
{
|
||||
if (AliyunOSSTempToken != null && AliyunOSSTempToken.Expiration > DateTime.UtcNow.AddMinutes(15))
|
||||
if (AliyunOSSTempToken != null && AliyunOSSTempToken.Expiration > DateTime.Now.AddMinutes(15))
|
||||
{
|
||||
return;
|
||||
return; // 还有15分钟以上,不需要续期
|
||||
}
|
||||
|
||||
lock (_tokenLock)
|
||||
|
|
|
|||
Loading…
Reference in New Issue