aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-07-18 00:29:19 +0900
committersyeyoung <cyong06@naver.com>2021-07-18 00:29:19 +0900
commit42e13e8a3dfe7e28bf8b71cb8cdcaf727e9c960c (patch)
treee792dfad78b9f892f550ca3ac31c4ac662fcbaac /src/main/java/kr/syeyoung/dungeonsguide
parent5534c9366b17b30a9c90722403acb58c5c09aa1b (diff)
downloadSkyblock-Dungeons-Guide-42e13e8a3dfe7e28bf8b71cb8cdcaf727e9c960c.tar.gz
Skyblock-Dungeons-Guide-42e13e8a3dfe7e28bf8b71cb8cdcaf727e9c960c.tar.bz2
Skyblock-Dungeons-Guide-42e13e8a3dfe7e28bf8b71cb8cdcaf727e9c960c.zip
heartbeat in stomp, so that you never disconnect!!
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClient.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClient.java b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClient.java
index 16943607..7226c1d6 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClient.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/stomp/StompClient.java
@@ -87,11 +87,11 @@ public class StompClient extends WebSocketClient implements StompInterface {
String heartbeat = payload.headers().get("heart-beat");
if (heartbeat != null) {
- int sx = Integer.parseInt(heartbeat.split(",")[0]);
- int sy = Integer.parseInt(heartbeat.split(",")[1]);
-
- if (sy == 0) return;
- int heartbeatMS = Integer.max(30000, sy);
+// int sx = Integer.parseInt(heartbeat.split(",")[0]);
+// int sy = Integer.parseInt(heartbeat.split(",")[1]);
+//
+// if (sy == 0) return;
+ int heartbeatMS = 30000;
this.heartbeat = ex.scheduleAtFixedRate(() -> {
send("\n");
}, heartbeatMS-1000, heartbeatMS-1000, TimeUnit.MILLISECONDS);