Skip to content

Commit

Permalink
Creation of DefaultChannelGroup should specify was actually incorrec…
Browse files Browse the repository at this point in the history
…t: newly added channels were simply added to the group after a group close, instead they should be closed when they are added when the group is closed
  • Loading branch information
vietj committed Mar 7, 2024
1 parent e888bde commit 7875eba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/io/vertx/core/net/impl/NetClientImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class NetClientImpl implements MetricsProvider, NetClient, Closeable {

public NetClientImpl(VertxInternal vertx, TCPMetrics metrics, NetClientOptions options, CloseFuture closeFuture) {
this.vertx = vertx;
this.channelGroup = new DefaultChannelGroup(vertx.getAcceptorEventLoopGroup().next());
this.channelGroup = new DefaultChannelGroup(vertx.getAcceptorEventLoopGroup().next(), true);
this.options = new NetClientOptions(options);
this.sslHelper = new SSLHelper(options, options.getApplicationLayerProtocols());
this.metrics = metrics;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ServerChannelLoadBalancer extends ChannelInitializer<Channel> {

ServerChannelLoadBalancer(EventExecutor executor) {
this.workers = new VertxEventLoopGroup();
this.channelGroup = new DefaultChannelGroup(executor);
this.channelGroup = new DefaultChannelGroup(executor, true);
}

public VertxEventLoopGroup workers() {
Expand Down

0 comments on commit 7875eba

Please sign in to comment.