提交 66c63c37 编写于 作者: R Rossen Stoyanchev

Ensure handshake attrs are copied in SockJS session

上级 b4d447fc
......@@ -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 {
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 {
this.id = id;
this.config = config;
this.handler = handler;
this.attributes = attributes;
if (attributes != null) {
this.attributes.putAll(attributes);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册