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: can not inovke nacos destroy when graceful shutdown #689

Merged
merged 3 commits into from
Aug 6, 2020

Conversation

lzp0412
Copy link
Contributor

@lzp0412 lzp0412 commented Aug 4, 2020

1、fix not inovke nacos destroy when graceful shutdown
2、upgrade nacos client version

@AlexStocks AlexStocks changed the title fix not inovke nacos destroy when graceful shutdown Fix: can not inovke nacos destroy when graceful shutdown Aug 4, 2020
@zouyx zouyx added this to the 1.5.1 milestone Aug 4, 2020
err := nr.DeRegister(url)
logger.Infof("DeRegister Nacos url:%+v", url)
if err != nil {
logger.Errorf("Deregister url:%+v err:%v", url, err.Error())
Copy link
Contributor

Choose a reason for hiding this comment

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

Deregister Nacos URL

@@ -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)
Copy link
Contributor

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 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Pls add func comment

Copy link
Member

@zouyx zouyx Aug 5, 2020

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

Copy link

@gaoxinge gaoxinge left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@fangyincheng fangyincheng left a comment

Choose a reason for hiding this comment

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

LGTM

@AlexStocks AlexStocks merged commit 0b5e2f4 into apache:develop Aug 6, 2020
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.

6 participants