< prev index next >

src/java.base/share/classes/sun/net/www/http/HttpClient.java

Print this page
*** 733,13 ***
--- 733,16 ---
              throw stex;
          } catch (IOException e) {
              closeServer();
              cachedHttpClient = false;
              if (!failedOnce && requests != null) {
+                 Thread thread = Thread.currentThread();
+                 boolean doNotRetry = thread.isVirtual() && thread.isInterrupted();
                  failedOnce = true;
                  if (getRequestMethod().equals("CONNECT")
                      || streaming
+                     || doNotRetry
                      || (httpuc.getRequestMethod().equals("POST")
                          && !retryPostProp)) {
                      // do not retry the request
                  }  else {
                      // try once more
< prev index next >