mirror of
https://gitee.com/wujiawei1207537021/wu-lazy-cloud-network.git
synced 2025-06-06 21:37:56 +08:00
[fix] 调整是否统计流量,避免网络问题导致流量缺口,数据丢失
This commit is contained in:
parent
f985cdac8f
commit
a019561c06
@ -28,7 +28,11 @@ public class ServerHandlerInFlowHandler extends AbstractHandleChannelFlowAdvance
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected boolean doSupport(ChannelFlow channelFlow) {
|
protected boolean doSupport(ChannelFlow channelFlow) {
|
||||||
return ChannelFlowEnum.IN_FLOW.equals(channelFlow.channelFlowEnum());
|
if (serverNodeProperties.getEnableFlowControl()) {
|
||||||
|
return ChannelFlowEnum.IN_FLOW.equals(channelFlow.channelFlowEnum());
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,7 +28,11 @@ public class ServerHandlerOutFlowHandler extends AbstractHandleChannelFlowAdvanc
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected boolean doSupport(ChannelFlow channelFlow) {
|
protected boolean doSupport(ChannelFlow channelFlow) {
|
||||||
return ChannelFlowEnum.OUT_FLOW.equals(channelFlow.channelFlowEnum());
|
if (serverNodeProperties.getEnableFlowControl()) {
|
||||||
|
return ChannelFlowEnum.OUT_FLOW.equals(channelFlow.channelFlowEnum());
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,8 +59,6 @@ public class ServerNodeProperties {
|
|||||||
@Data
|
@Data
|
||||||
public static class Tcp {
|
public static class Tcp {
|
||||||
private Integer port;
|
private Integer port;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user