dachuan9e commented on a change in pull request #11678:
URL: https://github.com/apache/shardingsphere/pull/11678#discussion_r684026192



##########
File path: 
shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/main/java/org/apache/shardingsphere/proxy/frontend/ShardingSphereProxy.java
##########
@@ -58,20 +54,28 @@
     @SneakyThrows(InterruptedException.class)
     public void start(final int port) {
         try {
-            createEventLoopGroup();
-            ServerBootstrap bootstrap = new ServerBootstrap();
-            initServerBootstrap(bootstrap);
-            ChannelFuture future = bootstrap.bind(port).sync();
-            startTime = new Date().getTime();
-            log.info("ShardingSphere-Proxy start success");
-            future.channel().closeFuture().sync();
+            ChannelFuture future = startInternal(port);
+            accept(future);
         } finally {
             workerGroup.shutdownGracefully();
             bossGroup.shutdownGracefully();
             BackendExecutorContext.getInstance().getExecutorEngine().close();
         }
     }
     
+    private ChannelFuture startInternal(final int port) throws 
InterruptedException {
+        createEventLoopGroup();
+        ServerBootstrap bootstrap = new ServerBootstrap();
+        initServerBootstrap(bootstrap);
+        ChannelFuture future = bootstrap.bind(port).sync();
+        return future;

Review comment:
       ok.




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