From d0c59790bb0c5b1c140bba7d488ca2166daf0fda Mon Sep 17 00:00:00 2001 From: Gravit Date: Fri, 24 May 2019 04:04:11 +0700 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BC=D0=B5=D1=85=D0=B0=D0=BD=D0=B8=D0=B7=D0=BC=20sch?= =?UTF-8?q?edule=20ping=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../launcher/request/websockets/WebSocketClientHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/WebSocketClientHandler.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/WebSocketClientHandler.java index 32ad7cf2..c7042963 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/WebSocketClientHandler.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/WebSocketClientHandler.java @@ -32,9 +32,9 @@ public void handlerAdded(final ChannelHandlerContext ctx) throws Exception { public void channelActive(final ChannelHandlerContext ctx) throws Exception { handshaker.handshake(ctx.channel()); clientJSONPoint.onOpen(); - ctx.executor().schedule(() -> { + ctx.executor().scheduleWithFixedDelay(() -> { ctx.channel().writeAndFlush(new PingWebSocketFrame()); - }, 20L, TimeUnit.SECONDS); + }, 20L, 20L, TimeUnit.SECONDS); } @Override