parent
244e39df0c
commit
f632ea0c36
1 changed files with 8 additions and 0 deletions
|
@ -374,6 +374,14 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet> imple
|
|||
@Override
|
||||
public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception
|
||||
{
|
||||
if (side == Side.CLIENT)
|
||||
{
|
||||
FMLCommonHandler.instance().bus().post(new FMLNetworkEvent.ClientDisconnectionFromServerEvent(manager));
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLCommonHandler.instance().bus().post(new FMLNetworkEvent.ServerDisconnectionFromClientEvent(manager));
|
||||
}
|
||||
ctx.close(promise);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue