[FIX] Server-side pings

This commit is contained in:
Gravit 2020-09-15 18:09:22 +07:00
parent ddab96f7ea
commit 211b440b8b
No known key found for this signature in database
GPG key ID: 98A079490768CCE5

View file

@ -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