Author: remm
Date: Fri Aug 11 16:10:32 2017
New Revision: 1804815

URL: http://svn.apache.org/viewvc?rev=1804815&view=rev
Log:
Fix possible race condition when using an upgraded connection and setting the 
IO listeners, it now uses the same processing as non upgraded connections.

Modified:
    
tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java
    tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java?rev=1804815&r1=1804814&r2=1804815&view=diff
==============================================================================
--- 
tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java
 (original)
+++ 
tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java
 Fri Aug 11 16:10:32 2017
@@ -100,14 +100,14 @@ public abstract class AbstractServletOut
             throw new IllegalArgumentException(
                     sm.getString("upgrade.sos.writeListener.set"));
         }
+        this.listener = listener;
+        this.applicationLoader = 
Thread.currentThread().getContextClassLoader();
         // Container is responsible for first call to onWritePossible() but 
only
         // need to do this if setting the listener for the first time.
         synchronized (fireListenerLock) {
             fireListener = true;
         }
         socketWrapper.addDispatch(DispatchType.NON_BLOCKING_WRITE);
-        this.listener = listener;
-        this.applicationLoader = 
Thread.currentThread().getContextClassLoader();
     }
 
 

Modified: tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1804815&r1=1804814&r2=1804815&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Fri Aug 11 16:10:32 2017
@@ -45,6 +45,14 @@
   issues do not "pop up" wrt. others).
 -->
 <section name="Tomcat 8.0.47 (violetagg)" rtext="In development">
+  <subsection name="Coyote">
+    <changelog>
+      <fix>
+        Fix possible race condition when setting IO listeners on an upgraded
+        connection. (remm)
+      </fix>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 8.0.46 (violetagg)" rtext="release in progress">
   <subsection name="Catalina">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to