[#1143] Also stop timer when call releaseExternalResources()

This commit is contained in:
Norman Maurer 2013-03-27 09:33:46 +01:00
parent bce398819a
commit 982c3ee9ee
2 changed files with 2 additions and 1 deletions

View File

@ -479,6 +479,7 @@ public abstract class AbstractTrafficShapingHandler extends
if (timeout != null) { if (timeout != null) {
timeout.cancel(); timeout.cancel();
} }
timer.stop();
} }
@Override @Override

View File

@ -51,7 +51,7 @@ import org.jboss.netty.util.Timer;
* {@link OrderedMemoryAwareThreadPoolExecutor} or {@link MemoryAwareThreadPoolExecutor}).<br> * {@link OrderedMemoryAwareThreadPoolExecutor} or {@link MemoryAwareThreadPoolExecutor}).<br>
* <tt>pipeline.addLast("GLOBAL_TRAFFIC_SHAPING", myHandler);</tt><br><br> * <tt>pipeline.addLast("GLOBAL_TRAFFIC_SHAPING", myHandler);</tt><br><br>
* </li> * </li>
* <li>When you shutdown your application, release all the external resources (except the timer internal itself) * <li>When you shutdown your application, release all the external resources
* by calling:<br> * by calling:<br>
* <tt>myHandler.releaseExternalResources();</tt><br> * <tt>myHandler.releaseExternalResources();</tt><br>
* </li> * </li>