mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-11-25 19:37:41 +08:00
fix(aria2): retry 5 times for get status (close #1857)
This commit is contained in:
@@ -70,6 +70,8 @@ func (m *Monitor) Update() (bool, error) {
|
|||||||
info, err := client.TellStatus(m.tsk.ID)
|
info, err := client.TellStatus(m.tsk.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
m.retried++
|
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 {
|
if m.retried > 5 {
|
||||||
return true, errors.Errorf("failed to get status of %s, retried %d times", m.tsk.ID, m.retried)
|
return true, errors.Errorf("failed to get status of %s, retried %d times", m.tsk.ID, m.retried)
|
||||||
|
|||||||
Reference in New Issue
Block a user