From a4d2895400f033a6b2018b117a8d555ccef0ed58 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Fri, 2 Jan 2015 15:24:14 +0100 Subject: [PATCH] removed unneeded execute for SslConnection onFillable --- .../org/eclipse/jetty/client/ssl/SslBytesServerTest.java | 8 ++++---- .../main/java/org/eclipse/jetty/io/ssl/SslConnection.java | 8 +++----- .../org/eclipse/jetty/servlet/AsyncServletIOTest.java | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslBytesServerTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslBytesServerTest.java index f2f3746b75b..0dd25341bcf 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslBytesServerTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/ssl/SslBytesServerTest.java @@ -1362,8 +1362,8 @@ public class SslBytesServerTest extends SslBytesTest // Check that we did not spin TimeUnit.MILLISECONDS.sleep(500); - Assert.assertThat(sslFills.get(), Matchers.lessThan(50)); - Assert.assertThat(sslFlushes.get(), Matchers.lessThan(20)); + Assert.assertThat(sslFills.get(), Matchers.lessThan(100)); + Assert.assertThat(sslFlushes.get(), Matchers.lessThan(50)); Assert.assertThat(httpParses.get(), Matchers.lessThan(100)); Assert.assertNull(request.get(5, TimeUnit.SECONDS)); @@ -1384,8 +1384,8 @@ public class SslBytesServerTest extends SslBytesTest // Check that we did not spin TimeUnit.MILLISECONDS.sleep(500); - Assert.assertThat(sslFills.get(), Matchers.lessThan(50)); - Assert.assertThat(sslFlushes.get(), Matchers.lessThan(20)); + Assert.assertThat(sslFills.get(), Matchers.lessThan(100)); + Assert.assertThat(sslFlushes.get(), Matchers.lessThan(50)); Assert.assertThat(httpParses.get(), Matchers.lessThan(100)); closeClient(client); 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 7d6276b68de..3f810f9f69b 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 @@ -34,7 +34,6 @@ import org.eclipse.jetty.io.ByteBufferPool; import org.eclipse.jetty.io.Connection; import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.io.EofException; -import org.eclipse.jetty.io.FillInterest; import org.eclipse.jetty.io.RuntimeIOException; import org.eclipse.jetty.io.SelectChannelEndPoint; import org.eclipse.jetty.io.WriteFlusher; @@ -197,7 +196,7 @@ public class SslConnection extends AbstractConnection if (_decryptedEndPoint._flushRequiresFillToProgress) { _decryptedEndPoint._flushRequiresFillToProgress = false; - getExecutor().execute(_runCompletWrite); + _runCompletWrite.run(); } } @@ -279,7 +278,7 @@ public class SslConnection extends AbstractConnection } if (fillable) getFillInterest().fillable(); - getExecutor().execute(_runCompletWrite); + _runCompletWrite.run(); } @Override @@ -396,8 +395,7 @@ public class SslConnection extends AbstractConnection else { // try to flush what is pending - // because this is a special case (see above) we could probably - // avoid the dispatch, but best to be sure + // execute to avoid recursion getExecutor().execute(_runCompletWrite); } } diff --git a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletIOTest.java b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletIOTest.java index 19ef2b10b8c..82c9d175a3a 100644 --- a/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletIOTest.java +++ b/jetty-servlet/src/test/java/org/eclipse/jetty/servlet/AsyncServletIOTest.java @@ -60,7 +60,7 @@ import org.junit.Test; import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; -// TODO need these on SPDY as well! +// TODO need these on HTTP2 as well! public class AsyncServletIOTest { private static final Logger LOG = Log.getLogger(AsyncServletIOTest.class);