Skip to content

Commit

Permalink
hotfix: Tetris Connection
Browse files Browse the repository at this point in the history
  • Loading branch information
seonghoo1217 committed Jun 22, 2024
1 parent 8ac31be commit 42c1a02
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package jungle.HandTris.application.impl;

import jungle.HandTris.application.service.MemberConnectionService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

@Service
@RequiredArgsConstructor
@Transactional
public class MemberConnectionServiceImpl implements MemberConnectionService {

private Set<String> connectedMembers = ConcurrentHashMap.newKeySet();
Expand All @@ -15,7 +21,8 @@ public void addUser(String sessionId) {
}

@Override
public void removeUser(String sessionId) {
public void
removeUser(String sessionId) {
connectedMembers.remove(sessionId);
}

Expand Down

0 comments on commit 42c1a02

Please sign in to comment.