-
Notifications
You must be signed in to change notification settings - Fork 929
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: can not inovke nacos destroy when graceful shutdown #689
Conversation
registry/nacos/registry.go
Outdated
err := nr.DeRegister(url) | ||
logger.Infof("DeRegister Nacos url:%+v", url) | ||
if err != nil { | ||
logger.Errorf("Deregister url:%+v err:%v", url, err.Error()) |
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.
Deregister Nacos URL
registry/nacos/registry.go
Outdated
@@ -193,6 +224,13 @@ func (nr *nacosRegistry) IsAvailable() bool { | |||
|
|||
// nolint | |||
func (nr *nacosRegistry) Destroy() { | |||
for _, url := range nr.registryUrls { | |||
err := nr.DeRegister(url) | |||
logger.Infof("DeRegister Nacos url:%+v", url) |
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.
Deregister Nacos URL
} | ||
|
||
func createDeregisterParam(url common.URL, serviceName string) vo.DeregisterInstanceParam { | ||
if len(url.Ip) == 0 { |
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.
Pls add func comment
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.
Pls add func comment
I think only public function need comment
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
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
1、fix not inovke nacos destroy when graceful shutdown
2、upgrade nacos client version