Merge branch 'dev' of github.com:GravitLauncher/Launcher into dev

This commit is contained in:
zaxar163 2019-05-24 12:37:59 +03:00
commit bcb65726af
2 changed files with 7 additions and 3 deletions

View file

@ -32,9 +32,9 @@ public void handlerAdded(final ChannelHandlerContext ctx) throws Exception {
public void channelActive(final ChannelHandlerContext ctx) throws Exception { public void channelActive(final ChannelHandlerContext ctx) throws Exception {
handshaker.handshake(ctx.channel()); handshaker.handshake(ctx.channel());
clientJSONPoint.onOpen(); clientJSONPoint.onOpen();
ctx.executor().schedule(() -> { ctx.executor().scheduleWithFixedDelay(() -> {
ctx.channel().writeAndFlush(new PingWebSocketFrame()); ctx.channel().writeAndFlush(new PingWebSocketFrame());
}, 20L, TimeUnit.SECONDS); }, 20L, 20L, TimeUnit.SECONDS);
} }
@Override @Override
@ -66,6 +66,10 @@ protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Except
LogHelper.dev("Message: %s", textFrame.text()); LogHelper.dev("Message: %s", textFrame.text());
// uncomment to print request // uncomment to print request
// logger.info(textFrame.text()); // logger.info(textFrame.text());
} else if ((frame instanceof PingWebSocketFrame)) {
frame.content().retain();
ctx.channel().writeAndFlush(new PongWebSocketFrame(frame.content()));
//return;
} else if (frame instanceof PongWebSocketFrame) { } else if (frame instanceof PongWebSocketFrame) {
} else if (frame instanceof CloseWebSocketFrame) } else if (frame instanceof CloseWebSocketFrame)
ch.close(); ch.close();

@ -1 +1 @@
Subproject commit 3bec47f61ceaf63f8c3de0bafc4a51224dfaddb1 Subproject commit baf1e7fb820fd1f4a1031e517fea03632f9e57e6