diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java index e891cf28..7af62164 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java @@ -53,9 +53,9 @@ public void channelActive(ChannelHandlerContext ctx) { client = new Client(null); Channel ch = ctx.channel(); service.registerClient(ch); - ctx.executor().schedule(() -> { + ctx.executor().scheduleAtFixedRate(() -> { ch.writeAndFlush(new PingWebSocketFrame(), ch.voidPromise()); - }, 30L, TimeUnit.SECONDS); + }, 30L , 30L, TimeUnit.SECONDS); } @Override