Merge branch 'hotfix-ping' into 'master'

update ping handler -- fixes cloudflare timeout

See merge request nitro/ms-websockets!3
This commit is contained in:
skeletor 2021-02-09 07:56:22 +00:00
commit c5566e11be
2 changed files with 2 additions and 4 deletions

View File

@ -6,7 +6,7 @@
<groupId>org.krews.plugin.nitro</groupId> <groupId>org.krews.plugin.nitro</groupId>
<artifactId>NitroWebsockets</artifactId> <artifactId>NitroWebsockets</artifactId>
<version>2.0</version> <version>3.0</version>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>

View File

@ -30,9 +30,6 @@ public class NetworkChannelInitializer extends ChannelInitializer<SocketChannel>
public void initChannel(SocketChannel ch) { public void initChannel(SocketChannel ch) {
ch.pipeline().addLast("logger", new LoggingHandler()); ch.pipeline().addLast("logger", new LoggingHandler());
ch.pipeline().addLast("idleStateHandler", new IdleStateHandler(60, 30, 0));
ch.pipeline().addAfter("idleStateHandler", "idleEventHandler", new IdleTimeoutHandler());
if(isSSL) { if(isSSL) {
ch.pipeline().addLast(context.newHandler(ch.alloc())); ch.pipeline().addLast(context.newHandler(ch.alloc()));
} }
@ -51,6 +48,7 @@ public class NetworkChannelInitializer extends ChannelInitializer<SocketChannel>
ch.pipeline().addLast(new GameClientMessageLogger()); ch.pipeline().addLast(new GameClientMessageLogger());
} }
ch.pipeline().addLast("idleEventHandler", new IdleTimeoutHandler(30, 60));
ch.pipeline().addLast(new GameMessageRateLimit()); ch.pipeline().addLast(new GameMessageRateLimit());
ch.pipeline().addLast(new GameMessageHandler()); ch.pipeline().addLast(new GameMessageHandler());