There are NetEventHandlers that want to directly modify _handlers; let's let them.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6757 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -32,6 +32,7 @@ import java.nio.channels.SelectionKey;
|
||||
import java.nio.channels.Selector;
|
||||
import java.nio.channels.SocketChannel;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.name.Named;
|
||||
@@ -171,7 +172,7 @@ public abstract class ConnectionManager extends LoopingThread
|
||||
|
||||
// close connections that have had no network traffic for too long
|
||||
long idleStamp = iterStamp - _idleTime;
|
||||
for (NetEventHandler handler : _handlers.values()) {
|
||||
for (NetEventHandler handler : Lists.newArrayList(_handlers.values())) {
|
||||
if (handler.checkIdle(idleStamp)) {
|
||||
// this will queue the connection for closure on our next tick
|
||||
handler.becameIdle();
|
||||
|
||||
Reference in New Issue
Block a user