Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2013-04-15 07:19:35 +0000
committerGreg Wilkins2013-04-15 07:19:35 +0000
commit4b546de9c9fc66fea155bf5b4bf6cee58c12975c (patch)
tree64d177e97f54f70c6674c3fe8ccc4b9c8d995541 /jetty-io
parent668290b77e16335b356fd1def048e6023c3e08cc (diff)
downloadorg.eclipse.jetty.project-4b546de9c9fc66fea155bf5b4bf6cee58c12975c.tar.gz
org.eclipse.jetty.project-4b546de9c9fc66fea155bf5b4bf6cee58c12975c.tar.xz
org.eclipse.jetty.project-4b546de9c9fc66fea155bf5b4bf6cee58c12975c.zip
364921 - FIN WAIT sockets
Diffstat (limited to 'jetty-io')
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java
index 3af882389d..3709322b76 100644
--- a/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java
+++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java
@@ -190,6 +190,10 @@ public class SslConnection extends AbstractConnection
if (DEBUG)
LOG.debug("onFillable enter {}", getEndPoint());
+ // We have received a close handshake, close the end point to send FIN.
+ if (_decryptedEndPoint.isInputShutdown())
+ getEndPoint().close();
+
// wake up whoever is doing the fill or the flush so they can
// do all the filling, unwrapping, wrapping and flushing
_decryptedEndPoint.getFillInterest().fillable();
@@ -425,7 +429,7 @@ public class SslConnection extends AbstractConnection
return true;
}
}
- else if (!isOutputShutdown())
+ else
{
// Normal readable callback
// Get called back on onfillable when then is more data to fill
@@ -864,7 +868,9 @@ public class SslConnection extends AbstractConnection
try
{
_sslEngine.closeOutbound();
- flush(BufferUtil.EMPTY_BUFFER);
+ flush(BufferUtil.EMPTY_BUFFER); // Send close handshake
+ getEndPoint().shutdownOutput(); // Send FIN
+ SslConnection.this.fillInterested(); // seek reply FIN or RST or close handshake
}
catch (Exception e)
{

Back to the top