Author: remm Date: Fri Oct 13 14:14:22 2017 New Revision: 1812134 URL: http://svn.apache.org/viewvc?rev=1812134&view=rev Log: Remove redirectSet field to avoid thread safety problems.
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1812134&r1=1812133&r2=1812134&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Fri Oct 13 14:14:22 2017 @@ -85,8 +85,6 @@ public class WsWebSocketContainer implem private static final byte[] HTTP_VERSION_BYTES = " HTTP/1.1\r\n".getBytes(StandardCharsets.ISO_8859_1); - private Set<URI> redirectSet = null; - private volatile AsynchronousChannelGroup asynchronousChannelGroup = null; private final Object asynchronousChannelGroupLock = new Object(); @@ -522,6 +520,8 @@ public class WsWebSocketContainer implem maxRedirects = Integer.parseInt(maxRedirectsValue); } + Set<URI> redirectSet = null; + if (httpResponse.status != 101) { if(isRedirectStatus(httpResponse.status)){ List<String> locationHeader = @@ -658,10 +658,6 @@ public class WsWebSocketContainer implem if (!success) { channel.close(); } - - if (redirectSet != null && !redirectSet.isEmpty()) { - redirectSet.clear(); - } } // Switch to WebSocket --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org