Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ private ChannelFuture createChannelAsync(final String addr) throws InterruptedEx
if (cw.isOK() || !cw.getChannelFuture().isDone()) {
return cw.getChannelFuture();
} else {
this.channelWrapperTables.remove(cw.getChannel());
this.channelTables.remove(addr);
}
}
Expand All @@ -723,7 +724,10 @@ private ChannelWrapper createChannel(String addr) {
ChannelFuture channelFuture = doConnect(addr);
LOGGER.info("createChannel: begin to connect remote host[{}] asynchronously", addr);
ChannelWrapper cw = new ChannelWrapper(addr, channelFuture);
this.channelTables.put(addr, cw);
ChannelWrapper oldChannelWrapper = this.channelTables.put(addr, cw);
if (oldChannelWrapper != null) {
channelWrapperTables.remove(oldChannelWrapper.getChannel());
}
this.channelWrapperTables.put(channelFuture.channel(), cw);
return cw;
}
Expand Down
Loading