You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am sure that all the content I provide is in English.
Search before asking
I had searched in the issues and found no similar issues.
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
Dubbo java 3.2
Steps to reproduce this issue
Improper handling of new channel in NettyConnectionClient#onConnected and NettyConnectionClient#onGoaway which could leak to a channel leak in Triple client and server.
@OverridepublicvoidonConnected(Objectchannel) {
if (!(channelinstanceofio.netty.channel.Channel)) {
return;
}
io.netty.channel.ChannelnettyChannel = ((io.netty.channel.Channel) channel);
if (isClosed()) {
nettyChannel.close();
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(String.format("%s is closed, ignoring connected event", this));
}
return;
}
this.channel.set(nettyChannel); // should close the existing channel before setting new channel// This indicates that the connection is available.if (this.connectingPromise.get() != null) {
this.connectingPromise.get().trySuccess(CONNECTED_OBJECT);
}
nettyChannel.attr(CONNECTION).set(this);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(String.format("%s connected ", this));
}
}
@OverridepublicvoidonGoaway(Objectchannel) {
if (!(channelinstanceofio.netty.channel.Channel)) {
return;
}
io.netty.channel.ChannelnettyChannel = (io.netty.channel.Channel) channel;
if (this.channel.compareAndSet(nettyChannel, null)) { // should close the existing channel before setting nullNettyChannel.removeChannelIfDisconnected(nettyChannel);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(String.format("%s goaway", this));
}
}
}
What you expected to happen
Close the existing channel before setting new channel
Anything else
No response
Are you willing to submit a pull request to fix on your own?
Yes I am willing to submit a pull request on my own!
Pre-check
Search before asking
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
Dubbo java 3.2
Steps to reproduce this issue
What you expected to happen
Anything else
No response
Are you willing to submit a pull request to fix on your own?
Code of Conduct
The text was updated successfully, but these errors were encountered: