https://bz.apache.org/bugzilla/show_bug.cgi?id=62614
Dapeng Zhang <zdap...@google.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #3 from Dapeng Zhang <zdap...@google.com> --- Update: I couldn't produce the bug with the "curl --output -" command because the output stream is always ready and enters an infinite loop, my bad; However, I can produce it using nghttp (see https://github.com/http2/http2-spec/wiki/Tools) client command, and this does not make it enter infinite loop. I added more debug info in the code to make sure we can see if it's looping or not: @Override public void onWritePossible() throws IOException { i++; System.out.println("onWritePossible called " + i + " times"); if (i > 3) { System.out.println("complete"); asyncContext.complete(); return; } int j = 0; while(output.isReady()) { System.out.println("start write j = " + j); output.write(bytes); System.out.println("write complete j = " + j); j++; } System.out.println("output.isReady() = " + false); } Deploy it to Tomcat and call the nghttp client command $ nghttp "http://127.0.0.1:8080/asyncwrite" -v It hangs. Check "logs/catalina.out", onWritePossible called only 1 time, and never called back again and clearly it's not in an infinite loop this time. onWritePossible called 1 times start write j = 0 write complete j = 0 start write j = 1 write complete j = 1 output.isReady() = false I also tried the same nghttp client to Jetty and Undertow, the onWritePossible callback can be called 4 times and finish. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org