private void checkEventSession(long nowTime) {
    eventSessionList.clear();
    Iterator<SelectionKey> selectedKeys = selector.selectedKeys().iterator();
    while (selectedKeys.hasNext()) {
      SelectionKey key = selectedKeys.next();
      if (key.isValid()) {
        selectedKeys.remove();
        Session session = (Session) key.attachment();
        eventSessionList.add(session);
      }
    }
    Iterator<Session> timeoutSessions = timeoutSessionSet.iterator();
    while (timeoutSessions.hasNext()) {
      Session session = timeoutSessions.next();
      if (session.getNextTimeout() <= nowTime) {
        session.setCurrentEvent(Session.Event.TIMEOUT);
        eventSessionList.add(session);
        timeoutSessions.remove();
      } else {
        break;
      }
    }

  }