364921 - FIN WAIT sockets
This commit is contained in:
parent
668290b77e
commit
4b546de9c9
|
@ -67,6 +67,7 @@ public class ManyConnectors
|
|||
new SslConnectionFactory(sslContextFactory,"http/1.1"),
|
||||
new HttpConnectionFactory(https_config));
|
||||
https.setPort(8443);
|
||||
https.setIdleTimeout(5000);
|
||||
|
||||
// Set the connectors
|
||||
server.setConnectors(new Connector[] { http, https });
|
||||
|
|
|
@ -5,5 +5,6 @@ org.eclipse.jetty.SOURCE=false
|
|||
#org.eclipse.jetty.STACKS=false
|
||||
#org.eclipse.jetty.spdy.LEVEL=DEBUG
|
||||
#org.eclipse.jetty.server.LEVEL=DEBUG
|
||||
#org.eclipse.jetty.io.ssl.LEVEL=DEBUG
|
||||
org.eclipse.jetty.io.LEVEL=DEBUG
|
||||
org.eclipse.jetty.io.ssl.LEVEL=DEBUG
|
||||
#org.eclipse.jetty.spdy.server.LEVEL=DEBUG
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue