diff --git a/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java b/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java index d144e377be..5f7df7f201 100644 --- a/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java +++ b/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java @@ -111,12 +111,11 @@ import org.jboss.netty.util.internal.ConcurrentIdentityWeakKeyHashMap; * * on every 3 seconds: * - * for (Object key: executor.getChildExecutorKeySet()) { - * InetAddress ip = (InetAddress) key; + * for (Iterator<Object> i = executor.getChildExecutorKeySet().iterator; i.hasNext();) { + * InetAddress ip = (InetAddress) i.next(); * if (there is no active connection from 'ip' now && * there has been no incoming connection from 'ip' for last 10 minutes) { - * - * executor.removeChildExecutor(key); + * i.remove(); * } * } *