340265 Improve handling of io shutdown in SSL

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2907 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2011-03-23 06:49:57 +00:00
parent a6483bfa6f
commit 3c3430718b
1 changed files with 11 additions and 1 deletions

View File

@ -338,7 +338,15 @@ public class HttpConnection /* extends AbstractConnection */ implements Connecti
}
}
}
// TODO - this needs to be greatly improved.
if (_endp.isOpen() && _endp.isInputShutdown() && _generator.isComplete())
{
complete=true;
close=true;
close();
}
if (complete || failed)
{
synchronized (this)
@ -353,6 +361,8 @@ public class HttpConnection /* extends AbstractConnection */ implements Connecti
{
HttpExchange exchange=_exchange;
_exchange.disassociate();
if (_exchange.getTimeout()>0 && _exchange.getTimeout()!=getDestination().getHttpClient().getTimeout())
_endp.setMaxIdleTime((int)getDestination().getHttpClient().getTimeout());
_exchange = null;