private synchronized void onFailure(Throwable t) {
        // If we've already failed, we don't overwrite the last-reported cause of failure
        if (this.state == State.FAILED)
            return;

        statusListener.onFailure(connName, t);
        this.state = State.FAILED;
    }
Fail the connector.
@param cause the cause of the failure; if null, the connector will not be failed
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerConnector.java