aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/api
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-06-27 16:56:13 +0300
committerGravatar Vitaly Takmazov2016-06-27 16:56:13 +0300
commit5fc121e7dc0c5c61dda58f4e4a73d7e43848e1e4 (patch)
tree2fccc4c4cdf3891ba9520bdf14cff4a9cbf9fbf7 /src/main/java/com/juick/api
parent462013333ed9ab6244e8b46106e3cb566efdd0e0 (diff)
telegram: reconnect websockets
Diffstat (limited to 'src/main/java/com/juick/api')
-rw-r--r--src/main/java/com/juick/api/TelegramBotHook.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/juick/api/TelegramBotHook.java b/src/main/java/com/juick/api/TelegramBotHook.java
index 429b55f3..e1094ff6 100644
--- a/src/main/java/com/juick/api/TelegramBotHook.java
+++ b/src/main/java/com/juick/api/TelegramBotHook.java
@@ -52,6 +52,7 @@ public class TelegramBotHook {
@Override
public void onDisconnected(WebSocket websocket, WebSocketFrame serverCloseFrame, WebSocketFrame clientCloseFrame, boolean closedByServer) throws Exception {
logger.info("ws disconnected");
+ ws.connect();
}
@Override
@@ -89,6 +90,7 @@ public class TelegramBotHook {
@Override
public void onDisconnected(WebSocket websocket, WebSocketFrame serverCloseFrame, WebSocketFrame clientCloseFrame, boolean closedByServer) throws Exception {
logger.info("ws replies disconnected");
+ ws.connect();
}
@Override