You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2015/06/12 18:44:24 UTC
svn commit: r1685129 -
/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
Author: remm
Date: Fri Jun 12 16:44:24 2015
New Revision: 1685129
URL: http://svn.apache.org/r1685129
Log:
57974: Key the open session map on the endpoint instance rather than endpoint class. Will backport if it doesn't cause issues. [forgot unregister ...]
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=1685129&r1=1685128&r2=1685129&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Fri Jun 12 16:44:24 2015
@@ -391,14 +391,12 @@ public class WsWebSocketContainer implem
protected void unregisterSession(Endpoint endpoint, WsSession wsSession) {
- Class<?> endpointClazz = endpoint.getClass();
-
synchronized (endPointSessionMapLock) {
- Set<WsSession> wsSessions = endpointSessionMap.get(endpointClazz);
+ Set<WsSession> wsSessions = endpointSessionMap.get(endpoint);
if (wsSessions != null) {
wsSessions.remove(wsSession);
if (wsSessions.size() == 0) {
- endpointSessionMap.remove(endpointClazz);
+ endpointSessionMap.remove(endpoint);
}
}
if (endpointSessionMap.size() == 0) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org