Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2011-02-01 01:57:12 +0000
committerGreg Wilkins2011-02-01 01:57:12 +0000
commitf807e15c775f60c1fe375e79b48a1d8f42fa54bb (patch)
tree73b7aede7252d3230df8361a8859277ab8a4272d
parentbcb2773c1bcbe88a401af84953c8a6858cd144a4 (diff)
downloadorg.eclipse.jetty.project-f807e15c775f60c1fe375e79b48a1d8f42fa54bb.tar.gz
org.eclipse.jetty.project-f807e15c775f60c1fe375e79b48a1d8f42fa54bb.tar.xz
org.eclipse.jetty.project-f807e15c775f60c1fe375e79b48a1d8f42fa54bb.zip
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
-rw-r--r--VERSION.txt1
-rw-r--r--jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java4
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/nio/SslSelectChannelEndPoint.java20
3 files changed, 23 insertions, 2 deletions
diff --git a/VERSION.txt b/VERSION.txt
index d2d8bd814e..4448c08cd4 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -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
diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java
index d37f54adc1..993348b52b 100644
--- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java
+++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java
@@ -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);
}
}
diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SslSelectChannelEndPoint.java b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SslSelectChannelEndPoint.java
index fa5e1b50b4..feacf9a646 100644
--- a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SslSelectChannelEndPoint.java
+++ b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/SslSelectChannelEndPoint.java
@@ -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()

Back to the top