tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: WebSocket status
Date Thu, 01 Mar 2012 18:15:58 GMT
On 01/03/2012 18:01, Filip Hanik - Dev Lists wrote:
> Alright, now that I'm all squared away with Autobahn and test cases
> running. Is there a specific unit test you have to produce this behavior?
> That would help me for digging through it.

Assuming you are running trunk, then what you'll currently have is NIO
is a purely blocking mode. The tests should all pass and take a minute
or two to run. If you apply the following patch, you'll enable
non-blocking reads for NIO at which point large numbers of tests should
start to fail / take forever / timeout. I usually just run the section 1
tests (i.e. "cases": ["1.*"]) in fuzzing_client_spec.json when
investigating these are they are mostly small payloads easy to trace.



--- a/java/org/apache/coyote/http11/upgrade/
+++ b/java/org/apache/coyote/http11/upgrade/
@@ -104,12 +104,10 @@ public class UpgradeNioProcessor extends
UpgradeProcessor<NioChannel> {
     public int read(boolean block, byte[] bytes, int off, int len)
             throws IOException {
-        // TODO Implement non-blocking reads. Should be as simple as
-        // true with block in the two lines below
         if (len > maxRead) {
-            return readSocket(true, bytes, off, maxRead);
+            return readSocket(block, bytes, off, maxRead);
         } else {
-            return readSocket(true, bytes, off, len);
+            return readSocket(block, bytes, off, len);

> Filip
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message