From b8cf02ca685e14ec856ac0c294098d6faa27b7eb Mon Sep 17 00:00:00 2001 From: Noah Hsu Date: Tue, 18 Oct 2022 15:27:19 +0800 Subject: [PATCH] fix(aria2): retry 5 times for get status (close #1857) --- internal/aria2/monitor.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/aria2/monitor.go b/internal/aria2/monitor.go index da746285..202a8b93 100644 --- a/internal/aria2/monitor.go +++ b/internal/aria2/monitor.go @@ -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)