Browse Source

Ensure handshake attrs are copied in SockJS session

pull/540/head
Rossen Stoyanchev 11 years ago
parent
commit
66c63c374b
  1. 8
      spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java

8
spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java

@ -25,6 +25,7 @@ import java.util.HashSet; @@ -25,6 +25,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledFuture;
import org.apache.commons.logging.Log;
@ -94,7 +95,7 @@ public abstract class AbstractSockJsSession implements SockJsSession { @@ -94,7 +95,7 @@ public abstract class AbstractSockJsSession implements SockJsSession {
private final WebSocketHandler handler;
private final Map<String, Object> attributes;
private final Map<String, Object> attributes = new ConcurrentHashMap<String, Object>();
private volatile State state = State.NEW;
@ -129,7 +130,10 @@ public abstract class AbstractSockJsSession implements SockJsSession { @@ -129,7 +130,10 @@ public abstract class AbstractSockJsSession implements SockJsSession {
this.id = id;
this.config = config;
this.handler = handler;
this.attributes = attributes;
if (attributes != null) {
this.attributes.putAll(attributes);
}
}

Loading…
Cancel
Save