final Map<User, DisconnectReason> removedUsers = new HashMap<User, DisconnectReason>();
synchronized (users) {
final Iterator<User> iterator = users.values().iterator();
while (iterator.hasNext()) {
final User u = iterator.next();
DisconnectReason reason = null;
if (System.nanoTime() - u.getLastHeardFrom() > PING_TIMEOUT) {
reason = DisconnectReason.PING_TIMEOUT;
}
else if (!u.isAdmin() && System.nanoTime() - u.getLastUserAction() > IDLE_TIMEOUT) {
reason = DisconnectReason.IDLE_TIMEOUT;