335329 Stop SSL spin during handshake and renogotiate
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2719 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
bcb2773c1b
commit
f807e15c77
|
@ -28,6 +28,7 @@ jetty-7.3.0-SNAPSHOT
|
|||
+ 334062 It should be possible to embed in the jetty.home.bundle the ssl keystore files
|
||||
+ 334229 javax-security needs to import the package javax.security.cert in its OSGi manifest
|
||||
+ 334311 fix buffer reuse issue in CachedExchange
|
||||
+ 335329 Stop SSL spin during handshake and renogotiate
|
||||
+ 335361 Fixed 'jetty.sh check' to show current PID when JETTY_PID env. variable is set
|
||||
+ 335641 Cleaned up dispatch handling to avoid key.interestOps==0 when undispatched
|
||||
+ 335681 Improve ChannelEndPoint.close() to avoid spinning
|
||||
|
|
|
@ -265,7 +265,7 @@ public class HttpConnection implements Connection
|
|||
|
||||
if (io > 0)
|
||||
no_progress = 0;
|
||||
else if (no_progress++ >= 2 && !_endp.isBlocking())
|
||||
else if (no_progress++ >= 1 && !_endp.isBlocking())
|
||||
{
|
||||
// SSL may need an extra flush as it may have made "no progress" while actually doing a handshake.
|
||||
if (_endp instanceof SslSelectChannelEndPoint && !_generator.isComplete() && !_generator.isEmpty())
|
||||
|
@ -406,8 +406,10 @@ public class HttpConnection implements Connection
|
|||
_exchange.disassociate();
|
||||
}
|
||||
|
||||
// Do we have more stuff to write?
|
||||
if (!_generator.isComplete() && _generator.getBytesBuffered()>0 && _endp instanceof AsyncEndPoint)
|
||||
{
|
||||
// Assume we are write blocked!
|
||||
((AsyncEndPoint)_endp).setWritable(false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -937,7 +937,25 @@ public class SslSelectChannelEndPoint extends SelectChannelEndPoint
|
|||
{
|
||||
return _engine;
|
||||
}
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
@Override
|
||||
public void setWritable(boolean writable)
|
||||
{
|
||||
// only set !writable if we are not waiting for input
|
||||
if (writable || !HandshakeStatus.NEED_UNWRAP.equals(_engine.getHandshakeStatus()) || super.isBufferingOutput())
|
||||
super.setWritable(writable);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
@Override
|
||||
public void scheduleWrite()
|
||||
{
|
||||
// only set !writable if we are not waiting for input
|
||||
if (!HandshakeStatus.NEED_UNWRAP.equals(_engine.getHandshakeStatus()) || super.isBufferingOutput())
|
||||
super.scheduleWrite();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
@Override
|
||||
public String toString()
|
||||
|
|
Loading…
Reference in New Issue