gnodet commented on code in PR #326:
URL: https://github.com/apache/maven-resolver/pull/326#discussion_r1314912695


##########
maven-resolver-transport-http/src/main/java/org/eclipse/aether/transport/http/HttpTransporter.java:
##########
@@ -704,4 +738,93 @@ public void writeTo(OutputStream os) throws IOException {
             }
         }
     }
+
+    private static class ResolverServiceUnavailableRetryStrategy implements 
ServiceUnavailableRetryStrategy {
+        private final int retryCount;
+
+        private final long retryInterval;
+
+        private final long retryIntervalMax;
+
+        private final Set<Integer> serviceUnavailableHttpCodes;
+
+        private static final ThreadLocal<Long> RETRY_INTERVAL_HOLDER = new 
ThreadLocal<>();

Review Comment:
   This is very ugly, but I don't see any other way.  It may warrant a comment 
to explain that the service is a singleton, but the call to `retryRequest` and 
`getRetryInterval` are done in the same thread, so this works.



-- 
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