Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #126 from SpigotMC/master
Browse files Browse the repository at this point in the history
SpigotMC#2055: Mark inactive channels as closed
  • Loading branch information
sleiss authored Feb 7, 2017
2 parents 33cb9e3 + 01f4448 commit 712982f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions proxy/src/main/java/net/md_5/bungee/netty/ChannelWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public void write(Object packet)
}
}

public void markClosed()
{
closed = closing = true;
}

public void close()
{
close( null );
Expand Down
1 change: 1 addition & 0 deletions proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public void channelInactive(ChannelHandlerContext ctx) throws Exception
{
if ( handler != null )
{
channel.markClosed();
handler.disconnected( channel );

if ( !( handler instanceof InitialHandler || handler instanceof PingHandler ) )
Expand Down

0 comments on commit 712982f

Please sign in to comment.