code: public void notifyChannelInactive() {
          // if this socket is transient OR we already received an explicit call to disconnect this endpoint,
          // there is no point in either reconnecting or signalling a config reload, since we are expecting
          // that this method will be called.
          if (isTransient || disconnected) {
              return;
          }
          LOGGER.info( "{}Got notified from Channel as inactive, " +
                  "attempting reconnect.", logIdent(channel, AbstractEndpoint.this));
  
          if (state() != LifecycleState.DISCONNECTED && state() != LifecycleState.DISCONNECTING) {
              signalConfigReload();
          }
  
          if (state() == LifecycleState.CONNECTED) {
              transitionState(LifecycleState.DISCONNECTED);
              connect(false).subscribe(new Subscriber<LifecycleState>() {
                  @Override
                  public void onCompleted() {}
  
                  @Override
                  public void onNext(LifecycleState lifecycleState) {}
  
                  @Override
                  public void onError(Throwable e) {
                      // Suppressing stack on purpose for reduced verbosity
                      LOGGER.warn("Error during reconnect: {}", e.toString());
                  }
              });
          }
      }
docs: Helper method that is called from inside the event loop to notify the upper {@link Endpoint} of a disconnect.
  
  Note that the connect method is only called if the endpoint is currently connected, since otherwise this would
  try to connect to a socket which has already been removed on a failover/rebalance out.
  
  Subsequent reconnect attempts are triggered from here.
  
  A config reload is only signalled if the current endpoint is not in a DISCONNECTED state, avoiding to signal
  a config reload under the case of a regular, intended channel close (in an unexpected socket close, the
  endpoint is in a connected or connecting state).