mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-31 20:59:54 +03:00
[FIX] Server-side pings
This commit is contained in:
parent
ddab96f7ea
commit
211b440b8b
1 changed files with 2 additions and 2 deletions
|
@ -53,9 +53,9 @@ public void channelActive(ChannelHandlerContext ctx) {
|
||||||
client = new Client(null);
|
client = new Client(null);
|
||||||
Channel ch = ctx.channel();
|
Channel ch = ctx.channel();
|
||||||
service.registerClient(ch);
|
service.registerClient(ch);
|
||||||
ctx.executor().schedule(() -> {
|
ctx.executor().scheduleAtFixedRate(() -> {
|
||||||
ch.writeAndFlush(new PingWebSocketFrame(), ch.voidPromise());
|
ch.writeAndFlush(new PingWebSocketFrame(), ch.voidPromise());
|
||||||
}, 30L, TimeUnit.SECONDS);
|
}, 30L , 30L, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue