提交 ed433a3c 编写于 作者: D duheng 提交者: von gosling

Fix the get connection bug when sending transactional message (#368)

上级 d8c446e8
......@@ -209,10 +209,13 @@ public class ProducerManager {
Channel channel = channelList.get(index);
int count = 0;
boolean isOk = channel.isActive() && channel.isWritable();
while (isOk && count++ < GET_AVALIABLE_CHANNEL_RETRY_COUNT) {
while (count++ < GET_AVALIABLE_CHANNEL_RETRY_COUNT) {
if (isOk) {
return channel;
}
index = (++index) % size;
channel = channelList.get(index);
return channel;
isOk = channel.isActive() && channel.isWritable();
}
} else {
log.warn("Check transaction failed, channel table is empty. groupId={}", groupId);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册