use of com.generallycloud.baseio.balance.ChannelLostFutureFactory in project baseio by generallycloud.
the class BalanceFacadeAcceptorSEListener method sessionClosed.
@Override
public void sessionClosed(SocketSession session) {
BalanceFacadeSocketSession fs = (BalanceFacadeSocketSession) session;
balanceRouter.removeClientSession(fs);
logger.info("client from [ {} ] disconnected.", session.getRemoteSocketAddress());
BalanceRouter balanceRouter = balanceContext.getBalanceRouter();
BalanceReverseSocketSession rs = balanceRouter.getRouterSession(fs);
if (rs == null) {
return;
}
ChannelLostFutureFactory factory = balanceContext.getChannelLostReadFutureFactory();
if (factory == null) {
return;
}
rs.flush(factory.createChannelLostPacket(fs));
}
Aggregations