perf[module]: Router发送消息增加高低水位判断

This commit is contained in:
jianan
2022-08-04 15:18:50 +08:00
parent 1e3f3654d4
commit 3977f96cbe
@@ -173,6 +173,10 @@ public class Router implements IRouter {
var packetInfo = EncodedPacketInfo.valueOf(packet, attachment);
var channel = session.getChannel();
if (!channel.isActive() || !channel.isWritable()) {
logger.error("send msg error, protocolId=[{}] isActive=[{}] isWritable=[{}]", packet.protocolId(), channel.isActive(), channel.isWritable());
return;
}
channel.writeAndFlush(packetInfo);
}