[FIX] Исправлена работа приема ping запросов у клиентской части вебсокетов

This commit is contained in:
Gravit 2019-05-24 03:29:03 +07:00
parent 539e98bf5a
commit aa1be6a23f
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -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();