From c7c220ecd33e7219d0524157acd6408ef9d5305d Mon Sep 17 00:00:00 2001 From: Mark Beamer Jr Date: Thu, 30 Jul 2020 13:37:44 -0400 Subject: [PATCH] Dont always fall through on every error. --- downloader/downloader.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/downloader/downloader.go b/downloader/downloader.go index c8500f1..7d79ae0 100644 --- a/downloader/downloader.go +++ b/downloader/downloader.go @@ -305,15 +305,15 @@ func run(use string, args []string, withStdErr, withStdOut bool, stopChan stop.C if strings.Contains(err.Error(), "exit status 1") { if strings.Contains(string(errorLog), "HTTP Error 429") || strings.Contains(string(errorLog), "returned non-zero exit status 8") { pool.SetThrottled(sourceAddress) + logrus.Debugf("known throttling error...try again (%d)", attemps) + continue } if attemps > maxtries { logrus.Debug("too many tries returning failure") break } - logrus.Debugf("known throttling error...try again (%d)", attemps) - continue } - logrus.Debug("Unkown error, returning failure") + logrus.Debug("Unkown error, returning failure: %s", err.Error()) return nil, errors.Prefix("youtube-dl "+strings.Join(argsForCommand, " "), err) } return strings.Split(strings.Replace(string(outLog), "\r\n", "\n", -1), "\n"), nil