lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Miller (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-8451) We should be calling method.abort before response.close in HttpSolrClient
Date Mon, 21 Dec 2015 17:30:46 GMT

    [ 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message