Author: markt Date: Tue Dec 17 21:47:28 2013 New Revision: 1551731 URL: http://svn.apache.org/r1551731 Log: Observed a hard to reproduce test failure with the non-blocking IO tests. Can't reproduce it yet. Working assumption is that Poller and application thread have a different view of the async field on the SocketWrapper so make all the flags the Poller uses volatile.
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java?rev=1551731&r1=1551730&r2=1551731&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java Tue Dec 17 21:47:28 2013 @@ -31,10 +31,10 @@ public class SocketWrapper<E> { private long timeout = -1; private boolean error = false; private volatile int keepAliveLeft = 100; - private boolean comet = false; - private boolean async = false; + private volatile boolean comet = false; + private volatile boolean async = false; private boolean keptAlive = false; - private boolean upgraded = false; + private volatile boolean upgraded = false; private boolean secure = false; /* * Following cached for speed / reduced GC --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org