Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1211

When using THttpClient, non 200 responses leave the connection open

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.6.1
    • 0.7
    • Java - Library
    • None
    • All

    • Patch Available

    Description

      The call to HttpClient.execute is done in a try/catch/finally which includes closing of entity's input stream in the finally clause (thus freeing resources).

      The problem is that when the response code is not 200 (OK), an exception is thrown BEFORE the inputstream is retrieved from the response's entity, when executing the finally clause, the resources are not freed as the inputstream is null.

      Attachments

        1. THRIFT-1211.patch
          1.0 kB
          Mathias Herberts

        Activity

          People

            herberts Mathias Herberts
            herberts Mathias Herberts
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: