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 2017/11/21 14:58:18 UTC

svn commit: r1815932 - in /tomcat/tc8.0.x/trunk: java/org/apache/coyote/http11/upgrade/Nio2ServletOutputStream.java webapps/docs/changelog.xml

Author: markt
Date: Tue Nov 21 14:58:18 2017
New Revision: 1815932

URL: http://svn.apache.org/viewvc?rev=1815932&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=61773
Fix a connection counting bug in the NIO2 connector that meant connections using the non-blocking I/O features of the Servlet API (which includes the WebSocket implementation on Tomcat 8.0.x) were not removed from the current connection count.

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

Modified: tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/upgrade/Nio2ServletOutputStream.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/upgrade/Nio2ServletOutputStream.java?rev=1815932&r1=1815931&r2=1815932&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/upgrade/Nio2ServletOutputStream.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/coyote/http11/upgrade/Nio2ServletOutputStream.java Tue Nov 21 14:58:18 2017
@@ -193,7 +193,8 @@ public class Nio2ServletOutputStream ext
 
     @Override
     protected void doClose() throws IOException {
-        channel.close(true);
+        // Close via the endpoint to ensure the connection count is correctly
+        // tracked
+        ((Nio2Endpoint) endpoint).closeSocket(socketWrapper, null);
     }
-
 }

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=1815932&r1=1815931&r2=1815932&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Tue Nov 21 14:58:18 2017
@@ -89,6 +89,12 @@
         leave large time gaps between network packets. Patch provided by Zilong
         Song. (markt)
       </fix>
+      <fix>
+        <bug>61773</bug>: Fix a connection counting bug in the NIO2 connector
+        that meant connections using the non-blocking I/O features of the
+        Servlet API (which includes the WebSocket implementation on Tomcat
+        8.0.x) were not removed from the current connection count. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="WebSocket">



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