Skip to content

Commit

Permalink
Fix netty close when init count is 0 (#12737)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ authored Jul 17, 2023
1 parent bd76d04 commit 630e14a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ public abstract class AbstractConnectionClient extends AbstractClient {

protected AbstractConnectionClient(URL url, ChannelHandler handler) throws RemotingException {
super(url, handler);
}

public final void increase() {
COUNTER_UPDATER.set(this, 1L);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ protected void initConnectionClient() {
this.channel = new AtomicReference<>();
this.closePromise = new DefaultPromise<>(GlobalEventExecutor.INSTANCE);
this.init = new AtomicBoolean(false);
this.increase();
}

@Override
Expand Down

0 comments on commit 630e14a

Please sign in to comment.