-
Notifications
You must be signed in to change notification settings - Fork 931
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: consul destory #788
Fix: consul destory #788
Conversation
registry/consul/registry.go
Outdated
select { | ||
case <-done: | ||
logger.Infof("consulRegistry unregister done") | ||
case <-ticker.C: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a time.After is enough in this simple case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I fixed it.
Codecov Report
@@ Coverage Diff @@
## develop #788 +/- ##
===========================================
- Coverage 63.75% 59.87% -3.88%
===========================================
Files 239 259 +20
Lines 12796 12753 -43
===========================================
- Hits 8158 7636 -522
- Misses 3849 4163 +314
- Partials 789 954 +165
Continue to review full report at Codecov.
|
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fix: consul destory
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函数的调用。从而从consul反注册。增加超时unregister超时的处理。
Does this PR introduce a user-facing change?:
NONE