Skip to content

Commit fe4bef4

Browse files
author
woytu
committed
fixed 邮件获取
1 parent d236a0c commit fe4bef4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

reptile/Netsarang.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,17 @@ func NetsarangGetInfo(mail, product string) (string, error) {
122122
if err != nil {
123123
return "", err
124124
}
125-
for i := 0; i < 30; {
126-
if mailList != nil || err != nil {
125+
for i := 0; i < 30; i++ {
126+
if len(mailList) > 0 {
127127
break
128128
}
129-
time.Sleep(1 * time.Minute)
129+
time.Sleep(10 * time.Second)
130130
mailList, err = LinShiYouXiangList(prefix)
131131
if err != nil {
132132
return "", err
133133
}
134134
}
135-
if len(mailList) == 0 || mailList == nil {
135+
if len(mailList) == 0 {
136136
return "", errors.New("没有邮件")
137137
}
138138
mailbox := mailList[len(mailList)-1]["mailbox"].(string)

0 commit comments

Comments
 (0)