You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2016/05/05 09:25:19 UTC
svn commit: r1742387 - in /tomcat/trunk:
java/org/apache/coyote/AsyncStateMachine.java webapps/docs/changelog.xml
Author: markt
Date: Thu May 5 09:25:19 2016
New Revision: 1742387
URL: http://svn.apache.org/viewvc?rev=1742387&view=rev
Log:
Always clear the nonBlocking listeners on complete. If complete is called from a non-container thread a number of states are possible. It is more robust to always clear the listeners.
Modified:
tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1742387&r1=1742386&r2=1742387&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] (original)
+++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java [UTF-8] Thu May 5 09:25:19 2016
@@ -272,6 +272,7 @@ public class AsyncStateMachine {
public synchronized boolean asyncComplete() {
pauseNonContainerThread();
+ clearNonBlockingListeners();
boolean doComplete = false;
if (state == AsyncState.STARTING) {
state = AsyncState.MUST_COMPLETE;
@@ -282,7 +283,6 @@ public class AsyncStateMachine {
state == AsyncState.ERROR) {
state = AsyncState.MUST_COMPLETE;
} else if (state == AsyncState.READ_WRITE_OP) {
- clearNonBlockingListeners();
state = AsyncState.MUST_COMPLETE;
} else {
throw new IllegalStateException(
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1742387&r1=1742386&r2=1742387&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu May 5 09:25:19 2016
@@ -238,6 +238,10 @@
<update>
<bug>59421</bug>: Add direct HTTP/2 connection support. (remm)
</update>
+ <fix>
+ Correctly handle a call to <code>AsyncContext.complete()</code> from a
+ non-container thread when non-blocking I/O is being used. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org