修复企业版身份认证可能会导致异常退出的问题

This commit is contained in:
GoEdgeLab
2021-07-22 10:45:23 +08:00
parent fa89f5f70d
commit e0a2b7ded0
2 changed files with 4 additions and 4 deletions

View File

@@ -74,6 +74,10 @@ func (this *AuthorityTask) Loop() error {
if err != nil {
return err
}
if resp.AuthorityKey == nil {
teaconst.IsPlus = false
return nil
}
var oldState = teaconst.IsPlus
if resp.AuthorityKey != nil && len(resp.AuthorityKey.Value) > 0 && resp.AuthorityKey.DayTo >= timeutil.Format("Y-m-d") {
teaconst.IsPlus = true