[ 
https://issues.apache.org/jira/browse/SOLR-8451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15066748#comment-15066748
 ] 

Mark Miller commented on SOLR-8451:
-----------------------------------

{noformat}
Index: solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
===================================================================
--- solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java   
(revision 1720969)
+++ solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java   
(working copy)
@@ -589,14 +589,16 @@
       throw new SolrServerException(
           "IOException occured when talking to server at: " + getBaseURL(), e);
     } finally {
-      if (respBody != null && shouldClose) {
-        try {
-          respBody.close();
-        } catch (IOException e) {
-          log.error("", e);
-        } finally {
-          if (!success) {
-            method.abort();
+      try {
+        if (!success) {
+          method.abort();
+        }
+      } finally {
+        if (respBody != null && shouldClose) {
+          try {
+            respBody.close();
+          } catch (IOException e) {
+            log.error("", e);
           }
         }
       }
{noformat}

> We should be calling method.abort before response.close in HttpSolrClient
> -------------------------------------------------------------------------
>
>                 Key: SOLR-8451
>                 URL: https://issues.apache.org/jira/browse/SOLR-8451
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Mark Miller
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to