聊天室信息发送
This commit is contained in:
parent
3f9cf509da
commit
2eea1f5789
|
|
@ -38,7 +38,7 @@ public class ChatRoom {
|
||||||
*/
|
*/
|
||||||
@OnOpen
|
@OnOpen
|
||||||
public void onOpen(Session session, @PathParam("userId") Long userId) {
|
public void onOpen(Session session, @PathParam("userId") Long userId) {
|
||||||
if (roomCache.isExistUser(userId)) {
|
if (!roomCache.isExistUser(userId)) {
|
||||||
sendMessage("用户不在房间中,拒绝连接", session);
|
sendMessage("用户不在房间中,拒绝连接", session);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue