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/02/02 12:54:33 UTC
svn commit: r1728091 - in /tomcat/trunk:
java/org/apache/tomcat/websocket/WsSession.java webapps/docs/changelog.xml
Author: markt
Date: Tue Feb 2 11:54:33 2016
New Revision: 1728091
URL: http://svn.apache.org/viewvc?rev=1728091&view=rev
Log:
Fix a timing issue which is one cause of intermittent unit test failures for WebSocket.
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java?rev=1728091&r1=1728090&r2=1728091&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java Tue Feb 2 11:54:33 2016
@@ -660,6 +660,10 @@ public class WsSession implements Sessio
// needs to be set here.
if (state == State.OPEN) {
futures.put(f2sh, f2sh);
+ } else if (f2sh.isDone()) {
+ // NO-OP. The future completed before the session closed to no
+ // need to register in case the session closes before it
+ // completes.
} else {
// Construct the exception outside of the sync block
fail = true;
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1728091&r1=1728090&r2=1728091&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Feb 2 11:54:33 2016
@@ -45,6 +45,13 @@
issues do not "pop up" wrt. others).
-->
<section name="Tomcat 9.0.0.M4" rtext="In development">
+ <subsection name="WebSocket">
+ <fix>
+ Fix a timing issue on session close that could result in an exception
+ being thrown for an incomplete message even through the message was
+ completed. (markt)
+ </fix>
+ </subsection>
</section>
<section name="Tomcat 9.0.0.M3" rtext="Voting in progress">
<subsection name="General">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org