public void removeCurrSession() {
    IClientSession session = currSession.get();
    if (session != null) {
      sessions.remove(session);
    }
    currSession.remove();
    currSessionIdleTime.remove();
  }
this method can be only used in client-thread model. But, in message-thread model based
service, calling this method has no side effect. <br>
MUST CALL THIS METHOD IN client-thread model services. Fortunately, we can just call this
method in thrift's event handler.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/session/SessionManager.java