code: synchronized void connectionFailed(Throwable t) {
          if (!isConnected()) {
              //another thread already disconnected this connector, so return
              return;
          }
  
          if (logger.isLoggable(Level.FINER)) {
              logger.logp(Level.FINER, logger.getName(), "connectionFailed", "Connection failed: " + RESTClientMessagesUtil.getObjID(this));
          }
  
          disconnect();
  
          if (notificationRegistry != null) {
              notificationRegistry.close();
          }
  
          //Emit the notification
          connector.connectionFailed(t);
      }
docs: When the connection fails we disconnect right away to keep anything else from happening (ie: bad connection)