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

fix: fix consulRegister not unregister when destory bug #787

Closed

Conversation

LaurenceLiZhixin
Copy link
Contributor

What this PR does:
修复consul Registry 在interrupt后不会立刻从注册中心消失的bug

Which issue(s) this PR fixes:
Fixes #749

Special notes for your reviewer:
修复consul Registry 在interrupt后不会立刻从注册中心消失的bug,在consulRegistry的Destory函数中增加对Unregister函数的调用。从而从注册中心反注册。

Does this PR introduce a user-facing change?:
NONE

修复consul Registry 在interrupt后不会立刻从注册中心消失的bug

@LaurenceLiZhixin LaurenceLiZhixin changed the title fix: fix destory unregister bug fix: fix consulRegister not unregister when destory bug Oct 10, 2020
Copy link
Member

@zouyx zouyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR detail change to english pls.

@@ -187,5 +187,10 @@ func (r *consulRegistry) IsAvailable() bool {

// Destroy consul registry center
func (r *consulRegistry) Destroy() {
if r.URL != nil{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should change test case for ensure this code become effective

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Member

@zouyx zouyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change target branch to develop

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.

【consul】服务被interrupt之后,并不会立刻从注册中心消失
3 participants