You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/03/01 11:12:05 UTC
[GitHub] [james-project] chibenwa commented on a change in pull request #886: [JAMES-3715] upgrade to netty 4.1.72.Final
chibenwa commented on a change in pull request #886:
URL: https://github.com/apache/james-project/pull/886#discussion_r816674020
##########
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:
I have some fixups : gracefull shutdown take time and we might not want it for tests
CF https://github.com/apache/james-project/pull/898
IMO graceful shutdown is not a requirement for Netty 4 adoption but merely a nice enhancement. I would likely not add it in this pull request and keep it separate...
--
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: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org