ws
This commit is contained in:
@@ -34,7 +34,7 @@ public class NotificationConnection {
|
||||
@OnOpen
|
||||
public void onOpen(Session session, @PathParam("id") String id) { // 接收到前端传来的用户ID
|
||||
this.session = session;
|
||||
this.session.setMaxIdleTimeout(MAX_TIME_OUT);
|
||||
// this.session.setMaxIdleTimeout(MAX_TIME_OUT);
|
||||
websockets.put(this, Long.parseLong(id)); //将ID作为key,当前的对象作为Value
|
||||
log.info("【建立连接】 用户为:{}", this.session);
|
||||
log.info("【建立连接】 用户Id为:{}", id);
|
||||
|
||||
Reference in New Issue
Block a user