code: public HThriftClient close() {
      if ( log.isDebugEnabled() ) {
        log.debug("Closing client {}", this);
      }
      if ( isOpen() ) {
        try {
          transport.flush();
        } catch (Exception e) {
          log.error("Could not flush transport (to be expected if the pool is shutting down) in close for client: " + toString(), e);
        } finally {
          try {
            transport.close();
          } catch (Exception e) {
            log.error("Error on transport close for client: " +toString(), e);
          }
        }
      }
      return this;
    }
docs: {@inheritDoc}