« get me outta code hell

http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src/crawl-http.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/crawl-http.js')
-rwxr-xr-xsrc/crawl-http.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crawl-http.js b/src/crawl-http.js
index 7f51c87..020506b 100755
--- a/src/crawl-http.js
+++ b/src/crawl-http.js
@@ -97,9 +97,9 @@ function crawl(absURL, opts = {}, internals = {}) {
       err => {
         console.warn("Failed to download: " + absURL)
 
-        if (attempts < maxAttempts) {
+        if (internals.attempts < maxAttempts) {
           console.warn(
-            `Trying again. Attempt ${attempts + 1}/${maxAttempts}...`
+            `Trying again. Attempt ${internals.attempts + 1}/${maxAttempts}...`
           )
 
           return crawl(absURL, opts, Object.assign({}, internals, {