[fix] 调整是否统计流量,避免网络问题导致流量缺口,数据丢失

This commit is contained in:
wujiawei 2025-01-16 09:52:03 +08:00
parent f985cdac8f
commit a019561c06
3 changed files with 10 additions and 4 deletions

View File

@ -28,7 +28,11 @@ public class ServerHandlerInFlowHandler extends AbstractHandleChannelFlowAdvance
*/
@Override
protected boolean doSupport(ChannelFlow channelFlow) {
if (serverNodeProperties.getEnableFlowControl()) {
return ChannelFlowEnum.IN_FLOW.equals(channelFlow.channelFlowEnum());
} else {
return false;
}
}
/**

View File

@ -28,7 +28,11 @@ public class ServerHandlerOutFlowHandler extends AbstractHandleChannelFlowAdvanc
*/
@Override
protected boolean doSupport(ChannelFlow channelFlow) {
if (serverNodeProperties.getEnableFlowControl()) {
return ChannelFlowEnum.OUT_FLOW.equals(channelFlow.channelFlowEnum());
} else {
return false;
}
}
/**

View File

@ -59,8 +59,6 @@ public class ServerNodeProperties {
@Data
public static class Tcp {
private Integer port;
}
@Data