code: public long ping(final Connection connection) throws DevFailed {
  
  		long result = 0;
  		final int maxRetries = connection.transparent_reconnection ? 1 : 0;
  		int nbRetries = 0;
  		boolean retry;
  		do {
  	    	try {
  				result = doPing(connection);
                  retry = false;
  	    	} catch (final DevFailed e) {
  				if (nbRetries < maxRetries) {
  		    		retry = true;
  				} else {
  		    		throw e;
  				}
  				nbRetries++;
  	    	}
  		} while (retry);
  		return result;
      }
docs: ===========================================================