[#1732] Fix bug which lead ChannelTrafficShapingHandler stop to work after first Channel was disconnected
This commit is contained in:
parent
cc12e40065
commit
f8f19d1539
@ -314,13 +314,6 @@ public abstract class AbstractTrafficShapingHandler extends ChannelDuplexHandler
|
||||
return trafficCounter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
|
||||
if (trafficCounter != null) {
|
||||
trafficCounter.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TrafficShaping with Write Limit: " + writeLimit +
|
||||
|
@ -91,4 +91,11 @@ public class ChannelTrafficShapingHandler extends AbstractTrafficShapingHandler
|
||||
setTrafficCounter(trafficCounter);
|
||||
trafficCounter.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
|
||||
if (trafficCounter != null) {
|
||||
trafficCounter.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user