chenyuzhi459 commented on code in PR #25788:
URL: https://github.com/apache/flink/pull/25788#discussion_r1887841888


##########
flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestClient.java:
##########
@@ -264,15 +278,21 @@ protected void initChannel(SocketChannel socketChannel) {
                     }
                 };
 
-        // No NioEventLoopGroup constructor available that allows passing 
nThreads, threadFactory,
-        // and selectStrategyFactory without also passing a SelectorProvider, 
so mimicking its
-        // default value seen in other constructors
-        NioEventLoopGroup group =
-                new NioEventLoopGroup(
-                        1,
-                        new ExecutorThreadFactory("flink-rest-client-netty"),
-                        SelectorProvider.provider(),
-                        selectStrategyFactory);
+        if (group == null) {
+            // No NioEventLoopGroup constructor available that allows passing 
nThreads,
+            // threadFactory,
+            // and selectStrategyFactory without also passing a 
SelectorProvider, so mimicking its
+            // default value seen in other constructors
+            group =
+                    new NioEventLoopGroup(
+                            1,
+                            new 
ExecutorThreadFactory("flink-rest-client-netty"),
+                            SelectorProvider.provider(),
+                            selectStrategyFactory);
+            useInternalEventLoopGroup = true;
+        } else {
+            useInternalEventLoopGroup = false;

Review Comment:
   > should we check that the supplied group is not shutting down or shutdown
   
   This check is necessary and the logic has been added. Thanks
   



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