Fix game session not being disposed with correctly when an exception occurs in the pipeline.

This commit is contained in:
thispixel
2015-04-28 12:39:01 +01:00
parent bacb708d26
commit 7e648cb7f4
+1 -1
View File
@@ -49,7 +49,7 @@ public final class ApolloHandler extends ChannelInboundHandlerAdapter {
@Override
public void channelInactive(ChannelHandlerContext ctx) {
Channel channel = ctx.channel();
Session session = ctx.attr(NetworkConstants.SESSION_KEY).getAndRemove();
Session session = channel.attr(NetworkConstants.SESSION_KEY).getAndRemove();
if (session != null) {
session.destroy();
}