Sending SSL close alert from both shutdownOutput() and close().

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@3217 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Simone Bordet 2011-05-19 21:28:41 +00:00
parent c6665c228a
commit 4ba3046a8b
1 changed files with 79 additions and 73 deletions

View File

@ -17,7 +17,6 @@ import java.io.IOException;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey; import java.nio.channels.SelectionKey;
import java.nio.channels.SocketChannel; import java.nio.channels.SocketChannel;
import javax.net.ssl.SSLEngine; import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLEngineResult; import javax.net.ssl.SSLEngineResult;
import javax.net.ssl.SSLEngineResult.HandshakeStatus; import javax.net.ssl.SSLEngineResult.HandshakeStatus;
@ -198,6 +197,12 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
@Override @Override
public void shutdownOutput() throws IOException public void shutdownOutput() throws IOException
{
sslClose();
super.shutdownOutput();
}
protected void sslClose() throws IOException
{ {
if (_closing) if (_closing)
return; return;
@ -310,6 +315,7 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint
@Override @Override
public void close() throws IOException public void close() throws IOException
{ {
sslClose();
super.close(); super.close();
} }