fix(aria2): retry 5 times for get status (close #1857)

pull/2058/head v3.2.1
Noah Hsu 2022-10-18 15:27:19 +08:00
parent 3db798a82a
commit b8cf02ca68
1 changed files with 2 additions and 0 deletions

View File

@ -70,6 +70,8 @@ func (m *Monitor) Update() (bool, error) {
info, err := client.TellStatus(m.tsk.ID)
if err != nil {
m.retried++
log.Errorf("failed to get status of %s, retried %d times", m.tsk.ID, m.retried)
return false, nil
}
if m.retried > 5 {
return true, errors.Errorf("failed to get status of %s, retried %d times", m.tsk.ID, m.retried)