diff options
author | Greg Wilkins | 2013-04-15 07:19:35 +0000 |
---|---|---|
committer | Greg Wilkins | 2013-04-15 07:19:35 +0000 |
commit | 4b546de9c9fc66fea155bf5b4bf6cee58c12975c (patch) | |
tree | 64d177e97f54f70c6674c3fe8ccc4b9c8d995541 /jetty-io | |
parent | 668290b77e16335b356fd1def048e6023c3e08cc (diff) | |
download | org.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.java | 10 |
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) { |