public boolean awaitShutdown(long timeoutMs) {
        try {
            return shutdownLatch.await(timeoutMs, TimeUnit.MILLISECONDS);
        } catch (InterruptedException e) {
            return false;
        }
    }
Wait for this connector to finish shutting down.

@param timeoutMs time in milliseconds to await shutdown
@return true if successful, false if the timeout was reached
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerConnector.java