We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de112ba commit f4bc9e7Copy full SHA for f4bc9e7
backend/src/main/java/io/f1/backend/domain/game/sse/app/SseService.java
@@ -44,12 +44,16 @@ public <T> void notifyLobbyUpdate(LobbySseEvent<T> event) {
44
}
45
46
private void startHeartBeat(SseEmitter emitter) {
47
- scheduler.scheduleAtFixedRate(() -> {
48
- try {
49
- emitter.send(SseEmitter.event().name("heartbeat").data("sse-alive"));
50
- } catch (IOException e) {
51
- emitterRepository.remove(emitter);
52
- }
53
- }, 5, 30, TimeUnit.SECONDS);
+ scheduler.scheduleAtFixedRate(
+ () -> {
+ try {
+ emitter.send(SseEmitter.event().name("heartbeat").data("sse-alive"));
+ } catch (IOException e) {
+ emitterRepository.remove(emitter);
+ }
54
+ },
55
+ 5,
56
+ 30,
57
+ TimeUnit.SECONDS);
58
59
0 commit comments