Skip to content

Commit

Permalink
Merge pull request #67 from fourix4/dev
Browse files Browse the repository at this point in the history
fix : socket 연결, 해제 할 때 에러 수정
  • Loading branch information
TaeHoon0 authored Jul 22, 2024
2 parents 1a8fda4 + 60debb3 commit 6cfcdee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/example/CatchStudy/service/ChatService.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Long> userList = chatRoomMap.get(chatRoomId);
Expand All @@ -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<Long> userList = chatRoomMap.get(chatRoomId);
Expand Down

0 comments on commit 6cfcdee

Please sign in to comment.