From e0a2b7ded02f6fb3dc467d6079d329e2aee60186 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Thu, 22 Jul 2021 10:45:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BC=81=E4=B8=9A=E7=89=88?= =?UTF-8?q?=E8=BA=AB=E4=BB=BD=E8=AE=A4=E8=AF=81=E5=8F=AF=E8=83=BD=E4=BC=9A?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=BC=82=E5=B8=B8=E9=80=80=E5=87=BA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.sum | 4 ---- internal/tasks/task_authority.go | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.sum b/go.sum index e1c9959a..bbea1165 100644 --- a/go.sum +++ b/go.sum @@ -64,10 +64,6 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/iwind/TeaGo v0.0.0-20210628135026-38575a4ab060/go.mod h1:KU4mS7QNiZ7QWEuDBk1zw0/Q2LrAPZv3tycEFBsuUwc= github.com/iwind/TeaGo v0.0.0-20210720011303-fc255c995afa h1:woN88uEmRRUNFD7pRZEtX9heDcjFn0ClMxjF5ButKow= github.com/iwind/TeaGo v0.0.0-20210720011303-fc255c995afa/go.mod h1:KU4mS7QNiZ7QWEuDBk1zw0/Q2LrAPZv3tycEFBsuUwc= -github.com/iwind/gosock v0.0.0-20210706152215-08fe64b7a8a3 h1:BVHIjJU5RUX0grmvDtr3ZZ2z0hX+ideJRpg4NtBXZfs= -github.com/iwind/gosock v0.0.0-20210706152215-08fe64b7a8a3/go.mod h1:H5Q7SXwbx3a97ecJkaS2sD77gspzE7HFUafBO0peEyA= -github.com/iwind/gosock v0.0.0-20210720054405-4030f271aa3f h1:+mKLTd5tCCLXK+iY5Xjz58hau6qFv9chGqcZ4FWUiIs= -github.com/iwind/gosock v0.0.0-20210720054405-4030f271aa3f/go.mod h1:H5Q7SXwbx3a97ecJkaS2sD77gspzE7HFUafBO0peEyA= github.com/iwind/gosock v0.0.0-20210721090148-db2e77703143 h1:RXINu3KVasw6MWv8MA6ne5ur84YhTAzG/j68YEM0KuI= github.com/iwind/gosock v0.0.0-20210721090148-db2e77703143/go.mod h1:H5Q7SXwbx3a97ecJkaS2sD77gspzE7HFUafBO0peEyA= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= diff --git a/internal/tasks/task_authority.go b/internal/tasks/task_authority.go index 485efe71..278baaa5 100644 --- a/internal/tasks/task_authority.go +++ b/internal/tasks/task_authority.go @@ -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