kwin opened a new issue, #2239:
URL: https://github.com/apache/maven-resolver/issues/2239

   ### New feature, improvement proposal
   
   Currently the retry configuration is disregarded in the Jetty Transporter. 
Unfortunately the Jetty HTTP Client API does not come with a hook for retries. 
So retries need be manually established like this:
   
   ```
   int attempt = 0;
       while (true) {
           try {
               return client.newRequest(url)
                            .timeout(5, TimeUnit.SECONDS)
                            .send();
           } catch (ExecutionException | TimeoutException e) {
               if (++attempt >= maxAttempts) {
                   throw e;
               }
               Thread.sleep(200L * (1L << attempt)); // 400ms, 800ms, ...
           }
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to