Skip to content

Commit

Permalink
fixed 邮件获取
Browse files Browse the repository at this point in the history
  • Loading branch information
woytu committed Jan 16, 2020
1 parent d236a0c commit fe4bef4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions reptile/Netsarang.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,17 @@ func NetsarangGetInfo(mail, product string) (string, error) {
if err != nil {
return "", err
}
for i := 0; i < 30; {
if mailList != nil || err != nil {
for i := 0; i < 30; i++ {
if len(mailList) > 0 {
break
}
time.Sleep(1 * time.Minute)
time.Sleep(10 * time.Second)
mailList, err = LinShiYouXiangList(prefix)
if err != nil {
return "", err
}
}
if len(mailList) == 0 || mailList == nil {
if len(mailList) == 0 {
return "", errors.New("没有邮件")
}
mailbox := mailList[len(mailList)-1]["mailbox"].(string)
Expand Down

0 comments on commit fe4bef4

Please sign in to comment.