聊天室信息发送
This commit is contained in:
parent
d6b62f282b
commit
082aedafdf
|
|
@ -39,10 +39,10 @@ public class ChatRoom {
|
|||
*/
|
||||
@OnOpen
|
||||
public void onOpen(Session session, @PathParam("roomId") String roomId) {
|
||||
// if (getRoomCache().createSuccess(roomId)) {
|
||||
// this.sendMessage("无此房间,拒绝连接", session);
|
||||
// return;
|
||||
// }
|
||||
if (getRoomCache().createSuccess(roomId)) {
|
||||
this.sendMessage("无此房间,拒绝连接", session);
|
||||
return;
|
||||
}
|
||||
Principal userPrincipal = session.getUserPrincipal();
|
||||
if (Objects.isNull(userPrincipal)) {
|
||||
this.sendMessage("用户验证失败,拒绝连接", session);
|
||||
|
|
|
|||
Loading…
Reference in New Issue