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

meshreg: fix zk reconnection mechanism failure #466

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

believening
Copy link
Contributor

  1. 根据 go-zk 的实现,正确连接到 zk 时的状态应该是 HasSession.
  2. 链接到 zk 但是创建 session 失败,状态转移会是 Connecting->Connected->[Expired]->Disconnnected,并触发异步执行的重连回调。通常此时在 slime 同时运行着链接状态确认逻辑,确认失败,同样会尝试建立新的的链接,也会导致循环重连的情况。

故确认链接正常时仅依据 HasSession 状态,并在重连被触发时,对状态进行二次确认后再执行。

@YonkaFang YonkaFang merged commit 3841145 into slime-io:master Dec 6, 2023
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

Successfully merging this pull request may close these issues.

2 participants