Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BrpcSingleChannel 关闭后仍然会有重连操作 #210

Closed
beihaifeiwu opened this issue Jan 20, 2021 · 0 comments
Closed

BrpcSingleChannel 关闭后仍然会有重连操作 #210

beihaifeiwu opened this issue Jan 20, 2021 · 0 comments

Comments

@beihaifeiwu
Copy link

beihaifeiwu commented Jan 20, 2021

synchronized (channelGroup) {
                if (oldChannel != channelGroup.channel) {
                    return;
                }
                Channel newChannel = null;
                try {
                    newChannel = channelGroup.createChannel(
                            channelGroup.getServiceInstance().getIp(),
                            channelGroup.getServiceInstance().getPort());
                } catch (Exception e) {
                    log.info("failed reconnecting");
                }
                if (newChannel != null) {
                    channelGroup.updateChannel(newChannel);
                    if (oldChannel != null) {
                        oldChannel.close();
                    }
                }
            }

ReConnectTask 中未校验channelGroup是否已close, 服务端有大量节点存在时,关闭时会报大量重连失败的日志, 并且进程退出的时间也会延后(等待重连线程中的任务执行)

@tullyliu tullyliu closed this as completed Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants