[utilities COMMIT] /spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java

noreply at shibboleth.net noreply at shibboleth.net
Sun Jul 5 08:00:51 EDT 2015


Author: rdw
Date: Sun Jul  5 08:00:51 2015
New Revision: 805

URL: http://svn.shibboleth.net/view/utilities?rev=805&view=rev
Log:
JSE-14 Close streams as we consume them

https://issues.shibboleth.net/jira/browse/JSE-14
We were holding on to the stream we got from the HTTP client , whuch by turn was pinning an Apache Connection.  This means that the Conbnection Manager stopped handing out connections (after 2) and hung.

Modified:
    spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java

Modified: spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java
URL: http://svn.shibboleth.net/view/utilities/spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java?rev=805&r1=804&r2=805&view=diff
==============================================================================
--- spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java	(original)
+++ spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResource.java	Sun Jul  5 08:00:51 2015
@@ -104,6 +104,9 @@
             backingResource.getFile().delete();
             log.error("{}: Copy failed", getDescription(), e);
             throw e;
+        } finally {
+            input.close();
+            out.close();
         }
         return new FileInputStream(backingResource.getFile());
     }



More information about the commits mailing list