diff --git a/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.java b/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.java index 7df33dfb7b4..b74c8e58fb4 100644 --- a/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.java +++ b/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.java @@ -230,8 +230,11 @@ public class EmbeddedSolrServer extends SolrServer throw new SolrServerException( ex ); } finally { - if (req != null) req.close(); - core.close(); + try { + if (req != null) req.close(); + } finally { + core.close(); + } } }