Fix netty close when init count is 0 (#12737)
This commit is contained in:
parent
bd76d044ba
commit
630e14ae40
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ public class NettyConnectionClient extends AbstractConnectionClient {
|
|||
this.channel = new AtomicReference<>();
|
||||
this.closePromise = new DefaultPromise<>(GlobalEventExecutor.INSTANCE);
|
||||
this.init = new AtomicBoolean(false);
|
||||
this.increase();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue