393160: fix connection leaks in NextProtoNegoClientConnection and NextProtoNegoServerConnection

This commit is contained in:
Thomas Becker 2012-10-30 16:33:51 +01:00
parent a1bf37f2a5
commit 1d6ec310b5
2 changed files with 2 additions and 1 deletions

View File

@ -95,6 +95,7 @@ public class NextProtoNegoClientConnection extends AbstractConnection implements
catch (IOException x) catch (IOException x)
{ {
LOG.debug(x); LOG.debug(x);
NextProtoNego.remove(engine);
getEndPoint().close(); getEndPoint().close();
return -1; return -1;
} }

View File

@ -25,7 +25,6 @@ import javax.net.ssl.SSLEngine;
import org.eclipse.jetty.io.AbstractConnection; import org.eclipse.jetty.io.AbstractConnection;
import org.eclipse.jetty.io.Connection; import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.io.EndPoint;
import org.eclipse.jetty.io.ssl.SslConnection.DecryptedEndPoint;
import org.eclipse.jetty.npn.NextProtoNego; import org.eclipse.jetty.npn.NextProtoNego;
import org.eclipse.jetty.server.ConnectionFactory; import org.eclipse.jetty.server.ConnectionFactory;
import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Connector;
@ -93,6 +92,7 @@ public class NextProtoNegoServerConnection extends AbstractConnection implements
catch (IOException x) catch (IOException x)
{ {
LOG.debug(x); LOG.debug(x);
NextProtoNego.remove(engine);
getEndPoint().close(); getEndPoint().close();
return -1; return -1;
} }