code: private boolean reportTransportLoss(Connection c, TaskListener listener) {
          Throwable cause = c.getReasonClosedCause();
          if (cause != null) {
              cause.printStackTrace(listener.error("Socket connection to SSH server was lost"));
          }
  
          return cause != null;
      }
docs: If the SSH connection as a whole is lost, report that information.