ff-wl commented on a change in pull request #886:
URL: https://github.com/apache/james-project/pull/886#discussion_r816682777



##########
File path: 
protocols/netty/src/main/java/org/apache/james/protocols/netty/AbstractAsyncServer.java
##########
@@ -128,17 +125,19 @@ protected void configureBootstrap(ServerBootstrap 
bootstrap) {
     
     @Override
     public synchronized void unbind() {
-        if (started == false) {
+        if (!started) {
             return;
         }
 
+        List<Future<?>> futures = new ArrayList<>();
         if (bossGroup != null) {
-            bossGroup.shutdownGracefully();
+            futures.add(bossGroup.shutdownGracefully());
         }
 
         if (workerGroup != null) {
-            workerGroup.shutdownGracefully();
+            futures.add(workerGroup.shutdownGracefully());
         }
+        
futures.forEach(Throwing.<Future<?>>consumer(Future::await).sneakyThrow());

Review comment:
       commit removed




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to