Check channel active before adding handlers. #1489

This commit is contained in:
md_5 2015-06-06 18:41:54 +10:00
parent 918d7229c2
commit cc3a8c067e

View File

@ -584,7 +584,7 @@ public final class UserConnection implements ProxiedPlayer
public void setCompressionThreshold(int compressionThreshold)
{
if ( this.compressionThreshold == -1 )
if ( ch.getHandle().isActive() && this.compressionThreshold == -1 )
{
this.compressionThreshold = compressionThreshold;
unsafe.sendPacket( new SetCompression( compressionThreshold ) );