curcur commented on a change in pull request #17187:
URL: https://github.com/apache/flink/pull/17187#discussion_r708032081



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -916,11 +931,15 @@ public final void cleanUp(Throwable throwable) throws 
Exception {
         suppressedException =
                 runAndSuppressThrowable(this::releaseOutputResources, 
suppressedException);
 
-        suppressedException =
-                runAndSuppressThrowable(channelIOExecutor::shutdown, 
suppressedException);
-
-        suppressedException = runAndSuppressThrowable(mailboxProcessor::close, 
suppressedException);
+        if (channelIOExecutor != null) {
+            suppressedException =
+                    runAndSuppressThrowable(channelIOExecutor::shutdown, 
suppressedException);
+        }

Review comment:
       er... I think `runAndSuppressThrowable` is not designed for this 
purpose, but coincidentally yes ^-^.
    




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to