docs: public HandleErrorResult secondaryFail(Method method, Object[] args, boolean killCmd)
        throws Throwable {
      proxy.lock.lock();
      try {
        if (pingSecondaryProtocol(this.secondaryProtocol)) {
          return relaunchOperation(method, args);
        }
      } finally {
        proxy.lock.unlock();
      }
  
      if (!isMasterHostFail()) {
        try {
          //check that master is on before switching to him
          if (masterProtocol != null && masterProtocol.isValid(1000)) {
            //switching to master connection
            syncConnection(secondaryProtocol, masterProtocol);
            proxy.lock.lock();
            try {
              currentProtocol = masterProtocol;
            } finally {
              proxy.lock.unlock();
            }
            FailoverLoop.addListener(this);
            logger.info("Connection to slave lost, using master connection"
                + ", query is re-execute on master server without throwing exception");
            return relaunchOperation(method,
                args); //now that we are on master, relaunched result if the result was not crashing the master
          }
        } catch (Exception e) {
          //ping fail on master
          if (setMasterHostFail()) {
            blackListAndCloseConnection(masterProtocol);
          }
        }
      }
  
      try {
        reconnectFailedConnection(new SearchFilter(true, true));
        handleFailLoop();
        if (isSecondaryHostFail()) {
          syncConnection(this.secondaryProtocol, this.masterProtocol);
          proxy.lock.lock();
          try {
            currentProtocol = this.masterProtocol;
          } finally {
            proxy.lock.unlock();
          }
        }
  
        if (killCmd) {
          return new HandleErrorResult(true, false);
        }
  
        logger.info("Connection to slave lost, new slave {}, conn={} found"
                + ", query is re-execute on new server without throwing exception",
            currentProtocol.getHostAddress(),
            currentProtocol.getServerThreadId());
        return relaunchOperation(method,
            args); //now that we are reconnect, relaunched result if the result was not crashing the node
      } catch (Exception ee) {
        //we will throw a Connection exception that will close connection
        FailoverLoop.removeListener(this);
        return new HandleErrorResult();
      }
    }