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