diff --git a/lib/handler/RetryHandler.js b/lib/handler/RetryHandler.js index 5819c7a9b13..a8112b36ee4 100644 --- a/lib/handler/RetryHandler.js +++ b/lib/handler/RetryHandler.js @@ -278,29 +278,6 @@ class RetryHandler { headers, count: this.retryCount }) - // Meant to just indicate weather or not trigger a retry - // It should return null to indicate we exhausted the retries - const retryAfter = this.retryOpts.retry( - err, - { counter: this.retryCount, currentTimeout: this.retryAfter }, - { retry: this.retryOpts, ...this.opts } - ) - - assert( - retryAfter == null || Number.isFinite(retryAfter), - 'invalid retryAfter' - ) - - if (retryAfter == null) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) - } - - this.retryAfter = retryAfter this.abort(err)