Browse Source

修复等待逻辑

Signed-off-by: allan716 <[email protected]>
allan716 3 years ago
parent
commit
9486bd1f0b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      internal/pkg/something_static/something_static.go

+ 2 - 1
internal/pkg/something_static/something_static.go

@@ -107,10 +107,11 @@ func GetCodeFromWeb(l *logrus.Logger, nowTimeFileNamePrix string) (string, strin
 		if err != nil {
 			updateTimeString, code, err = getCodeFromWeb(l, desUrlBackup)
 			if err != nil {
+				time.Sleep(time.Second * 5)
 				continue
 			}
 		}
-		time.Sleep(time.Second * 5)
+
 		found = true
 	}