code: public synchronized void close() throws IOException, InterruptedException {
  		if (isClosed){
  			return;
  		}
  		
  		logger.info("closing client endpoint");
  		if (connState == CONN_STATE_CONNECTED) {
  			idPriv.disconnect();
  			this.wait(1000);
  		}
  		if (connState >= CONN_STATE_RESOURCES_ALLOCATED) {
  			idPriv.destroyQP();
  		}
  		idPriv.destroyId();
  		group.unregisterClientEp(this);
  		isClosed = true;
  		logger.info("closing client done");
  	}
docs: Close this endpoint.
  
  This closes the connection and free's all the resources, e.g., queue pair.
  @throws InterruptedException
  
  @throws Exception the exception