Skip to content

Commit

Permalink
Shutdown eventloop immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
injectives committed Feb 23, 2024
1 parent fd9ef8c commit b91cc14
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
import java.util.function.Function;
Expand Down Expand Up @@ -225,7 +226,9 @@ public CompletionStage<Void> close() {
synchronized (this) {
if (this.closeFuture == null) {
this.closeFuture = new CompletableFuture<>();
eventLoopGroup.shutdownGracefully().addListener(future -> this.closeFuture.complete(null));
eventLoopGroup
.shutdownGracefully(0, 0, TimeUnit.MILLISECONDS)
.addListener(future -> this.closeFuture.complete(null));
}
closeFuture = this.closeFuture;
}
Expand Down

0 comments on commit b91cc14

Please sign in to comment.