mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 16:51:37 +00:00
Fix game session not being disposed with correctly when an exception occurs in the pipeline.
This commit is contained in:
@@ -49,7 +49,7 @@ public final class ApolloHandler extends ChannelInboundHandlerAdapter {
|
|||||||
@Override
|
@Override
|
||||||
public void channelInactive(ChannelHandlerContext ctx) {
|
public void channelInactive(ChannelHandlerContext ctx) {
|
||||||
Channel channel = ctx.channel();
|
Channel channel = ctx.channel();
|
||||||
Session session = ctx.attr(NetworkConstants.SESSION_KEY).getAndRemove();
|
Session session = channel.attr(NetworkConstants.SESSION_KEY).getAndRemove();
|
||||||
if (session != null) {
|
if (session != null) {
|
||||||
session.destroy();
|
session.destroy();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user