Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8224857

java.net.http.HttpClient hangs if network connection is terminated

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      os_x

      Description

      ADDITIONAL SYSTEM INFORMATION :
      OS: macOS 10.14.5 (18F132)
      java version "11.0.3" 2019-04-16 LTS


      A DESCRIPTION OF THE PROBLEM :
      HttpClient does not use the specified timeout and waits indefinitely for request to complete at (HttpClientImpl.java:541 when the network connection is terminated during the request.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run ./gradlew clean test


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      com.fortum.java11clientnetworkerror.ClientTest#clientTestWithNetworkError will finish
      ACTUAL -
      com.fortum.java11clientnetworkerror.ClientTest#clientTestWithNetworkError runs forever

      ---------- BEGIN SOURCE ----------
      https://github.com/slorinc/java11clientnetworkerror
      ---------- END SOURCE ----------

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              dfuchs Daniel Fuchs
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: