C0urante commented on a change in pull request #8069:
URL: https://github.com/apache/kafka/pull/8069#discussion_r420900467



##########
File path: 
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerConnector.java
##########
@@ -166,27 +244,105 @@ private void pause() {
         }
     }
 
+    /**
+     * Stop this connector. This method does not block, it only triggers 
shutdown. Use
+     * #{@link #awaitShutdown} to block until completion.
+     */
     public void shutdown() {
+        synchronized (this) {
+            log.info("Scheduled shutdown for {}", this);
+            stopping = true;
+            notify();
+        }
+    }
+
+    void doShutdown() {
         try {
             if (state == State.STARTED)
                 connector.stop();
-            this.state = State.STOPPED;
+            WorkerConnector.this.state = State.STOPPED;

Review comment:
       Mmm, good catch. Think this might have been left behind from a previous 
iteration of the PR.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to