gianm commented on code in PR #19056:
URL: https://github.com/apache/druid/pull/19056#discussion_r3049474384


##########
extensions-core/kubernetes-extensions/src/main/java/org/apache/druid/k8s/discovery/DefaultK8sApiClient.java:
##########
@@ -163,9 +164,11 @@ public boolean hasNext() throws SocketTimeoutException
           catch (RuntimeException ex) {
             if (ex.getCause() instanceof SocketTimeoutException) {
               throw (SocketTimeoutException) ex.getCause();
-            } else {
-              throw ex;
             }
+            if (ex.getCause() instanceof StreamResetException) {

Review Comment:
   If there is a need to look for okhttp-specific exceptions, and more generic 
logic cannot be used, you could check for them by class name. i.e. `if 
ex.getCause().getClass().getName().equals("foo.bar.StreamResetException")`.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to