From 5fc121e7dc0c5c61dda58f4e4a73d7e43848e1e4 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 27 Jun 2016 16:56:13 +0300 Subject: telegram: reconnect websockets --- src/main/java/com/juick/api/TelegramBotHook.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/com/juick') 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 -- cgit v1.2.3