[FIX] Изменен механизм schedule ping запросов

This commit is contained in:
Gravit 2019-05-24 04:04:11 +07:00
parent dadaa34926
commit d0c59790bb
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -32,9 +32,9 @@ public void handlerAdded(final ChannelHandlerContext ctx) throws Exception {
public void channelActive(final ChannelHandlerContext ctx) throws Exception {
handshaker.handshake(ctx.channel());
clientJSONPoint.onOpen();
ctx.executor().schedule(() -> {
ctx.executor().scheduleWithFixedDelay(() -> {
ctx.channel().writeAndFlush(new PingWebSocketFrame());
}, 20L, TimeUnit.SECONDS);
}, 20L, 20L, TimeUnit.SECONDS);
}
@Override