code: @Override
      public void afterDisconnect(SlaveComputer slaveComputer, final TaskListener listener) {
          if (connection == null) {
              // Nothing to do here, the connection is not established
              return;
          }
  
          ExecutorService srv = launcherExecutorService;
          if (srv != null) {
              // If the service is still running, shut it down and interrupt the operations if any
              srv.shutdown();
          }
  
          if (tearingDownConnection) {
              // tear down operation is in progress, do not even try to synchronize the call.
              //TODO: what if reconnect attempts collide? It should not be possible due to locks, but maybe it worth investigation
              LOGGER.log(Level.FINE, "There is already a tear down operation in progress for connection {0}. Skipping the call", connection);
              return;
          }
          tearDownConnection(slaveComputer, listener);
      }
docs: {@inheritDoc}