Author: remy.maucherat(a)jboss.com
Date: 2013-11-28 09:58:18 -0500 (Thu, 28 Nov 2013)
New Revision: 2311
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsServerContainer.java
Log:
Port patch to avoid NPE after HTTP session expiration.
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsServerContainer.java
===================================================================
---
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsServerContainer.java 2013-11-26
11:44:43 UTC (rev 2310)
+++
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsServerContainer.java 2013-11-28
14:58:18 UTC (rev 2311)
@@ -393,7 +393,10 @@
private void unregisterAuthenticatedSession(WsSession wsSession,
String httpSessionId) {
Set<WsSession> wsSessions = authenticatedSessions.get(httpSessionId);
- wsSessions.remove(wsSession);
+ // wsSessions will be null if the HTTP session has ended
+ if (wsSessions != null) {
+ wsSessions.remove(wsSession);
+ }
}
Show replies by date