code: public static void releaseTransport(ClientTransport clientTransport, int disconnectTimeout) {
          if (clientTransport == null) {
              return;
          }
          boolean needDestroy = CLIENT_TRANSPORT_HOLDER.removeClientTransport(clientTransport);
          // 执行销毁动作
          if (needDestroy) {
              if (disconnectTimeout > 0) { // 需要等待结束时间
                  int count = clientTransport.currentRequests();
                  if (count > 0) { // 有正在调用的请求
                      long start = RpcRuntimeContext.now();
                      if (LOGGER.isInfoEnabled()) {
                          LOGGER.info("There are {} outstanding call in transport, wait {}ms to end",
                              count, disconnectTimeout);
                      }
                      while (clientTransport.currentRequests() > 0
                          && RpcRuntimeContext.now() - start < disconnectTimeout) { // 等待返回结果
                          try {
                              Thread.sleep(10);
                          } catch (InterruptedException ignore) {
                          }
                      }
                  } // 关闭前检查已有请求？
              }
              // disconnectTimeout已过
              int count = clientTransport.currentRequests();
              if (count > 0) { // 还有正在调用的请求
                  if (LOGGER.isWarnEnabled()) {
                      LOGGER.warn("There are {} outstanding call in client transport, but shutdown now.", count);
                  }
              }
              // 反向的也删一下
              if (REVERSE_CLIENT_TRANSPORT_MAP != null) {
                  String key = NetUtils.channelToString(clientTransport.remoteAddress(), clientTransport.localAddress());
                  REVERSE_CLIENT_TRANSPORT_MAP.remove(key);
              }
              clientTransport.destroy();
          }
      }
docs: 销毁长连接
  
  @param clientTransport   ClientTransport
  @param disconnectTimeout disconnect timeout