Skip to content

Commit

Permalink
Don't await the recursive call
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Jan 29, 2020
1 parent 208afe6 commit 56d11bd
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,7 @@ const requestRemoteNode = (url, headers, tmpFilename, httpOpts, attempt = 1) =>
if (attempt < RETRY_LIMIT) {
// Retry by calling ourself recursively
resolve(
await requestRemoteNode(
url,
headers,
tmpFilename,
httpOpts,
attempt + 1
)
requestRemoteNode(url, headers, tmpFilename, httpOpts, attempt + 1)
)
} else {
reject(`Failed to download ${url} after ${RETRY_LIMIT} attempts`)
Expand Down

0 comments on commit 56d11bd

Please sign in to comment.