Better example

This commit is contained in:
Trustin Lee 2009-07-21 10:27:17 +00:00
parent 82a84d822d
commit dc06648005

View File

@ -111,12 +111,11 @@ import org.jboss.netty.util.internal.ConcurrentIdentityWeakKeyHashMap;
* *
* on every 3 seconds: * on every 3 seconds:
* *
* for (Object key: executor.getChildExecutorKeySet()) { * for (Iterator<Object> i = executor.getChildExecutorKeySet().iterator; i.hasNext();) {
* InetAddress ip = (InetAddress) key; * InetAddress ip = (InetAddress) i.next();
* if (there is no active connection from 'ip' now && * if (there is no active connection from 'ip' now &&
* there has been no incoming connection from 'ip' for last 10 minutes) { * there has been no incoming connection from 'ip' for last 10 minutes) {
* * i.remove();
* executor.removeChildExecutor(key);
* } * }
* } * }
* </pre> * </pre>