src/Guzzle/MiddlewareFactory.php
private function getRetryDelay() {
		return function ( $numberOfRetries, Response $response = null ) {
			// The $response argument is only passed as of Guzzle 6.2.2.
			if ( $response !== null ) {
				// Retry-After may be a number of seconds or an absolute date (RFC 7231,
				// section 7.1.3).
				$retryAfter = $response->getHeaderLine( 'Retry-After' );

				if ( is_numeric( $retryAfter ) ) {
					return 1000 * $retryAfter;
				}

				if ( $retryAfter ) {
					$seconds = strtotime( $retryAfter ) - time();
					return 1000 * max( 1, $seconds );
				}
			}

			return 1000 * $numberOfRetries;
		};
	}
private function getRetryDelay() {
		return function ( $numberOfRetries, Response $response = null ) {
			// The $response argument is only passed as of Guzzle 6.2.2.
			if ( $response !== null ) {
				// Retry-After may be a number of seconds or an absolute date (RFC 7231,
				// section 7.1.3).
				$retryAfter = $response->getHeaderLine( 'Retry-After' );

				if ( is_numeric( $retryAfter ) ) {
					return 1000 * $retryAfter;
				}

				if ( $retryAfter ) {
					$seconds = strtotime( $retryAfter ) - time();
					return 1000 * max( 1, $seconds );
				}
			}

			return 1000 * $numberOfRetries;
		};
	}
private function getRetryDelay ( ) { return function ( $ numberOfRetries , Response $ response = null ) { // The $response argument is only passed as of Guzzle 6.2.2. if ( $ response !== null ) { // Retry-After may be a number of seconds or an absolute date (RFC 7231, // section 7.1.3). $ retryAfter = $ response -> getHeaderLine ( 'Retry-After' ) ; if ( is_numeric ( $ retryAfter ) ) { return 1000 * $ retryAfter ; } if ( $ retryAfter ) { $ seconds = strtotime ( $ retryAfter ) - time ( ) ; return 1000 * max ( 1 , $ seconds ) ; } } return 1000 * $ numberOfRetries ; } ; }
Returns a method that takes the number of retries and returns the number of miliseconds
to wait

@return callable
Returns a method that takes the number of retries and returns the number of miliseconds to wait