public void resetMethodStateIfStopped() {
    if (!___manager.isRunning()) {
      if (___transport != null && ___transport.isOpen()) {
        ___transport.close();
        LOGGER.warn("Manually closing transport to prevent resource leakage.");
      }
      ___currentMethod = null;
      LOGGER.info("Method state has been reset due to manager not running.");
    }
  }
return self, the method doesn't need to be called by the user and will be triggered after the
RPC is finished.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/client/async/AsyncPipeDataTransferServiceClient.java