File tree 2 files changed +6
-3
lines changed
backend/src/main/java/site/coduo/websocket
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ public class WebSocketHandler extends TextWebSocketHandler {
22
22
public void afterConnectionEstablished (final WebSocketSession session ) {
23
23
final String pairRoomAccessCode = parsePairRoomAccessCode (session );
24
24
pairRoomWebSocketSessionStore .addSession (pairRoomAccessCode , session );
25
- schedulerService .notifyTimerStatus (pairRoomAccessCode );
26
25
log .info ("연결 성공 : {}" , session .getId ());
27
26
}
28
27
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ public void onSubscription(final SessionSubscribeEvent event) {
30
30
throw new NotFoundAccessCodeInQueryException ("STOMP 헤더에 simpDestination이 존재하지 않습니다." );
31
31
}
32
32
final String key = parsePairRoomKey (destination );
33
- schedulerService .notifyTimerStatus (key );
33
+ if (timerStompManager .isTimerStatusDestination (key , destination )) {
34
+ schedulerService .notifyTimerStatus (key );
35
+ }
34
36
}
35
37
36
38
@ EventListener
@@ -41,7 +43,9 @@ public void onUnSubscription(final SessionUnsubscribeEvent event) {
41
43
throw new NotFoundAccessCodeInQueryException ("STOMP 헤더에 simpSubscriptionId가 존재하지 않습니다." );
42
44
}
43
45
final String key = parsePairRoomKey (destination );
44
- schedulerService .syncTimerWithDatabase (key );
46
+ if (timerStompManager .isTimerStatusDestination (key , destination )) {
47
+ schedulerService .syncTimerWithDatabase (key );
48
+ }
45
49
}
46
50
47
51
private String parsePairRoomKey (final String destination ) {
You can’t perform that action at this time.
0 commit comments