[jboss-remoting-commits] JBoss Remoting SVN: r5109 - remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Thu Apr 30 21:11:18 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-04-30 21:11:18 -0400 (Thu, 30 Apr 2009)
New Revision: 5109
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java
Log:
Close the handle when the context is closed
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java 2009-05-01 01:10:07 UTC (rev 5108)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java 2009-05-01 01:11:18 UTC (rev 5109)
@@ -367,11 +367,17 @@
connectionProviders.remove(uriScheme, provider);
}
});
- return new AbstractSimpleCloseable(executor) {
+ final AbstractSimpleCloseable handle = new AbstractSimpleCloseable(executor) {
protected void closeAction() throws IOException {
context.close();
}
};
+ context.addCloseHandler(new CloseHandler<ConnectionProviderContext>() {
+ public void handleClose(final ConnectionProviderContext closed) {
+ IoUtils.safeClose(handle);
+ }
+ });
+ return handle;
}
public String toString() {
More information about the jboss-remoting-commits
mailing list