From 59e631cc74dd6e0e5364c313fa56d9557bc67e7d Mon Sep 17 00:00:00 2001 From: TaeHoon0 Date: Mon, 22 Jul 2024 11:05:21 +0900 Subject: [PATCH] =?UTF-8?q?[#39]=20fix=20:=20socket=20=EC=97=B0=EA=B2=B0,?= =?UTF-8?q?=20=ED=95=B4=EC=A0=9C=ED=95=A0=20=EB=95=8C=20=EC=97=90=EB=9F=AC?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/example/CatchStudy/service/ChatService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/CatchStudy/service/ChatService.java b/src/main/java/com/example/CatchStudy/service/ChatService.java index a8d1c6b..4d3202c 100644 --- a/src/main/java/com/example/CatchStudy/service/ChatService.java +++ b/src/main/java/com/example/CatchStudy/service/ChatService.java @@ -105,7 +105,7 @@ public MessageResponseDto createMessage(long chatRoomId, MessageRequestDto messa @EventListener public void handleSessionConnect(SessionConnectEvent event) { - long chatRoomId = Long.parseLong((String) event.getMessage().getHeaders().get("simpDestination")); + long chatRoomId = Long.parseLong((String) event.getMessage().getHeaders().get("chatRoomId")); long userId = usersService.getCurrentUserId(); List userList = chatRoomMap.get(chatRoomId); @@ -117,7 +117,7 @@ public void handleSessionConnect(SessionConnectEvent event) { @EventListener public void handleSessionDisconnect(SessionDisconnectEvent event) { - long chatRoomId = Long.parseLong((String) event.getMessage().getHeaders().get("simpDestination")); + long chatRoomId = Long.parseLong((String) event.getMessage().getHeaders().get("chatRoomId")); long userId = usersService.getCurrentUserId(); List userList = chatRoomMap.get(chatRoomId);