From 01f44483df8623f30affe3c972f988038a501fa6 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 7 Feb 2017 08:58:37 +1100 Subject: [PATCH] #2055: Mark inactive channels as closed --- .../src/main/java/net/md_5/bungee/netty/ChannelWrapper.java | 5 +++++ proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java | 1 + 2 files changed, 6 insertions(+) diff --git a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java index 28a4f176..9050534a 100644 --- a/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java +++ b/proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java @@ -57,6 +57,11 @@ public class ChannelWrapper } } + public void markClosed() + { + closed = closing = true; + } + public void close() { close( null ); diff --git a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java index 3efeff81..cbdd976b 100644 --- a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java +++ b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java @@ -52,6 +52,7 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter { if ( handler != null ) { + channel.markClosed(); handler.disconnected( channel ); if ( !( handler instanceof InitialHandler || handler instanceof PingHandler ) )